Sample code for 30+ languages & platforms
Chilkat2-Python

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml.

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import sys
import chilkat2

success = False

mailman = chilkat2.MailMan()

# ...
# ...

filePath = "c:/example/emailBundle.xml"

# ------------------------------------------------------------------------
# The LoadXmlFile method is deprecated:

# bundleObj is a CkEmailBundle
bundleObj = mailman.LoadXmlFile(filePath)
if (mailman.LastMethodSuccess == False):
    print(mailman.LastErrorText)
    sys.exit()

# ...
# ...

# ------------------------------------------------------------------------
# Do the equivalent using EmailBundle.LoadXml.

bundle = chilkat2.EmailBundle()
success = bundle.LoadXml(filePath)
if (success == False):
    print(bundle.LastErrorText)
    sys.exit()