(Go) Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString
Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString. Note: This example requires Chilkat v11.0.0 or greater.
mailman := MailMan_Ref.html">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_Ref.html">EmailBundle.LoadXmlString.
bundle := EmailBundle_Ref.html">chilkat.NewEmailBundle()
success := bundle.LoadXmlString(xmlBundleStr)
if success == false {
fmt.Println(bundle.LastErrorText())
mailman.DisposeMailMan()
bundle.DisposeEmailBundle()
return
}
mailman.DisposeMailMan()
bundle.DisposeEmailBundle()
|