Sample code for 30+ languages & platforms
CkPython Requires Chilkat v11.0.0+

Transition from MailMan.LoadEml to Email.LoadEml

Provides instructions for replacing deprecated MailMan.LoadEml method calls with Email.LoadEml.

Chilkat CkPython Downloads

CkPython
import sys
import chilkat

success = False

mailman = chilkat.CkMailMan()

#  ...
#  ...

filePath = "c:/dir/example.eml"

#  ------------------------------------------------------------------------
#  The MailMan.LoadEml method is deprecated:

# emailObj is a CkEmail
emailObj = mailman.LoadEml(filePath)
if (mailman.get_LastMethodSuccess() == False):
    print(mailman.lastErrorText())
    sys.exit()

#  ...
#  ...

#  ------------------------------------------------------------------------
#  Do the equivalent using Email.LoadEml.

email = chilkat.CkEmail()
success = email.LoadEml(filePath)
if (success == False):
    print(email.lastErrorText())
    sys.exit()