Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

Index of Chilkat Blog Posts

January 27, 2006

Receiving Encrypted Email


I have never tried to read email programmatically, so please excuse me if my questions sound silly. How does the Chilkat Mail know if the email being read needs to be decrypted or not.

The structure of the MIME indicates that it is encrypted. Upon receiving an email, Chilkat Mail recognizes it and automatically locates the matching certificate w/ private key from the certificate store(s) on your computer and decrypts the email. The results of the decryption are available in these properties:

email.ReceivedEncrypted <– true if the email as received encrypted.
email.Decrypted <– true if decryption was successful.

and this method:

email.GetEncryptedByCert() <– returns the Cert object for the certificate used in decryption.

After receiving the email, the Chilkat.Email object is in the state it would be had the email been sent without encryption. This allows your program to handle encrypted and non-encrypted emails identically. (Other than checking the properties/methods I mentioned above.)

The trick to getting everything working correctly is to make sure your certificate w/private key is installed on your system properly (from a .pfx file).

Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.