Sample code for 30+ languages & platforms
Go

Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString

Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString.

Chilkat Go Downloads

Go
    success := false

    mailman := chilkat.NewMailMan()

    // ...
    // ...

    xmlBundleStr := "..."

    // ------------------------------------------------------------------------
    // The LoadXmlString method is deprecated:

    bundleObj := mailman.LoadXmlString(xmlBundleStr)
    if mailman.LastMethodSuccess() == false {
        fmt.Println(mailman.LastErrorText())
        mailman.DisposeMailMan()
        return
    }

    // ...
    // ...

    bundleObj.DisposeEmailBundle()

    // ------------------------------------------------------------------------
    // Do the equivalent using EmailBundle.LoadXmlString.

    bundle := chilkat.NewEmailBundle()
    success = bundle.LoadXmlString(xmlBundleStr)
    if success == false {
        fmt.Println(bundle.LastErrorText())
        mailman.DisposeMailMan()
        bundle.DisposeEmailBundle()
        return
    }


    mailman.DisposeMailMan()
    bundle.DisposeEmailBundle()