Chilkat2-Python
Chilkat2-Python
Transition from MailMan.LoadEml to Email.LoadEml
Provides instructions for replacing deprecated MailMan.LoadEml method calls with Email.LoadEml.Chilkat Chilkat2-Python Downloads
import sys
import chilkat2
success = False
mailman = chilkat2.MailMan()
# ...
# ...
filePath = "c:/dir/example.eml"
# ------------------------------------------------------------------------
# The MailMan.LoadEml method is deprecated:
# emailObj is a CkEmail
emailObj = mailman.LoadEml(filePath)
if (mailman.LastMethodSuccess == False):
print(mailman.LastErrorText)
sys.exit()
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using Email.LoadEml.
email = chilkat2.Email()
success = email.LoadEml(filePath)
if (success == False):
print(email.LastErrorText)
sys.exit()