Sample code for 30+ languages & platforms
Chilkat2-Python

Demonstrates how to call AddPfxSourceData for an Email Object

Demonstrates how to call AddPfxSourceData for an Email Object

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import sys
import chilkat2

success = False

fac = chilkat2.FileAccess()

# pfxBytes is a memoryview
pfxBytes = fac.ReadEntireFile("qa_data/pfx/some.pfx")

email = chilkat2.Email()

success = email.AddPfxSourceData(pfxBytes,"PFX_PASSWORD")
if (success != True):
    print(email.LastErrorText)
    sys.exit()

print("Success.")