Hi,
I have just downloaded Aspose.EMail.dll version 3.7 with an evaluation licence.
I have written an application to read an e-mail and save the attachment to Disk.
Below is an excerpt from the code:
MailMessage message = client.FetchMessage(messageInfo.SequenceNumber);
// See if signed and decrypt
if (message.IsSigned)
message.Decrypt();
All works fine for non-signed and non-encrypted messages. Attachments saves all good.
HOWEVER –
When the message is signed and encrypted (message has not been encrypted or signed using Aspose, but some third party), I get problems.
If I run the above with the “Decrypt” statement commented out, the attachment that is saved is named “smime.p7m”
If I run the above with the “Decrypt” statement in, I get the error message:-
[AutoMail.vshost.exe] - [Error] - [8/01/2014 2:55:51 PM] - System.InvalidOperationException: Mail message is not signed
at Aspose.Email.Mail.MailMessage.Decrypt(X509Certificate2 certificate)
at Aspose.Email.Mail.MailMessage.Decrypt()
I have read an associated post on this topic, but it does not help me.
Thanks
Jeff