Python Requires Chilkat v11.0.0+
Python
Read To and Cc from a received message
See more Email Object Examples
Enumerate visible recipients by zero-based index. An address can have an empty display name. A delivered copy usually does not reveal recipients who were blind-copied.
Chilkat Python Downloads
import sys
import chilkat2
success = False
# Assumes Chilkat is unlocked. See Global Unlock Sample.
email = chilkat2.Email()
success = email.LoadEml("message.eml")
if (success != True):
print(email.LastErrorText)
sys.exit()
i = 0
while (i < email.NumTo) :
print("To: " + email.GetToName(i) + " " + email.GetToAddr(i))
i = i + 1
i = 0
while (i < email.NumCC) :
print("Cc: " + email.GetCcName(i) + " " + email.GetCcAddr(i))
i = i + 1