MailMill .NET Class Library

Mail.Encrypt Property

Gets or sets a boolean value that indicates whether or not the message needs to be encrypted.

public bool Encrypt {get; set;}

Remarks

All recipients certificates must be present in the ReceiversCertificateLocation store to encrypt a message. This include the Tos recipients, the Ccs recipients and the Bccs recipients.
By default, Encrypt is set to false.

Exceptions

Exception Type Condition
MailMillException Your license does not allow you to use S/MIME functionalities.

Example

This sample shows how to encrypt a message.

Mail oMail = new Mail();
oMail.Attachments.Add(@"c:\confidential\confidential_report.pdf");
oMail.Encrypt = true;

See Also

Mail Class | MailMill Namespace | ReceiversCertificateLocation | EncryptionAlgorithm | Tos | Ccs | Bccs