Sample code for 30+ languages & platforms
CkPython

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

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

Chilkat CkPython Downloads

CkPython
import sys
import chilkat

success = False

mailman = chilkat.CkMailMan()

# ...
# ...

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

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

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

# ...
# ...

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

bundle = chilkat.CkEmailBundle()
success = bundle.LoadXml(filePath)
if (success == False):
    print(bundle.lastErrorText())
    sys.exit()