(Go) Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml
Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml. Note: This example requires Chilkat v11.0.0 or greater.
mailman := MailMan_Ref.html">chilkat.NewMailMan()
// ...
// ...
filePath := "c:/example/emailBundle.xml"
// ------------------------------------------------------------------------
// The LoadXmlFile method is deprecated:
bundleObj := mailman.LoadXmlFile(filePath)
if mailman.LastMethodSuccess() == false {
fmt.Println(mailman.LastErrorText())
mailman.DisposeMailMan()
return
}
// ...
// ...
bundleObj.DisposeEmailBundle()
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle_Ref.html">EmailBundle.LoadXml.
bundle := EmailBundle_Ref.html">chilkat.NewEmailBundle()
success := bundle.LoadXml(filePath)
if success == false {
fmt.Println(bundle.LastErrorText())
mailman.DisposeMailMan()
bundle.DisposeEmailBundle()
return
}
mailman.DisposeMailMan()
bundle.DisposeEmailBundle()
|