Sample code for 30+ languages & platforms
Chilkat2-Python

Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString

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

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import sys
import chilkat2

success = False

mailman = chilkat2.MailMan()

# ...
# ...

xmlBundleStr = "..."

# ------------------------------------------------------------------------
# The LoadXmlString method is deprecated:

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

# ...
# ...

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

bundle = chilkat2.EmailBundle()
success = bundle.LoadXmlString(xmlBundleStr)
if (success == False):
    print(bundle.LastErrorText)
    sys.exit()