MailMill .NET Class Library

Mail.SenderCertificateLocation Property

Gets or sets an MM_STORE_LOCATION value that specifies the location of the sender's certificate.

public MM_STORE_LOCATION SenderCertificateLocation {get; set;}

Remarks

By default, a certificate blocks the direct access to its private key. If you want MailMill to use a certificate to sign messages, you must authorize the access to the certificate private key. Thus, you need to export your certificate (disable private key strong protection) and import it in the store you choose.
By default, SenderCertificateLocation is set to MM_STORE_LOCATION.mmStoreCurrentUser.

Exceptions

Exception Type Condition
ArgumentException SenderCertificateLocation is set with and invalid MM_STORE_LOCATION value.

Example

This sample show how to change the sender certificate location.

Mail oMail = new Mail();
oMail.SignMode = MM_SIGN_MODE.mmSignClear;
oMail.SenderCertificateLocation = MM_STORE_LOCATION.mmStoreLocalMachine;

See Also

Mail Class | MailMill Namespace | MM_STORE_LOCATION | SignMode