Yes, this is possible. These parameters are accessible through MailMessage
object's Recipients
property that includes a collection of SubjectInfo
objects. They provide information related to recipients of the message and include the EncryptionParameters
property that returns MailEncryptionParameters
used to encrypt the message for the recipient:
// load an encrypted message
var mail = new MailMessage();
mail.Load("mail.eml");
// show list of all padding schemes used by this message
foreach (SubjectInfo recipient in mail.Recipients)
{
Console.WriteLine("{0} {1}",
recipient.EncryptionParameters.PaddingScheme,
recipient.EncryptionParameters.HashAlgorithm);
}
Please note that this really is per-recipient info - it's possible for a single message to use RSAES-OAEP to encrypt the message some recipients and RSAES-PKCS1-v1_5 for others.