we have updated our application to Aspose 17.12.0, some unit test have failed. After investigation we have found the reason.
The reason is that when we have a Clear Signed Message, Or Encrypted Message, or Opaque Signed Message and we convert this message to EML using
message.ToMailMessage(new MailConversionOptions()
{
ConvertAsTnef = false
});
Then, we try to save this message after converting (Original Message not Mime Message) using this code message.Save(@“c:\test\AfetrConvertingToMime.msg”, SaveOptions.DefaultMsgUnicode)
We couldn’t open this message in outlook and it becomes corrupted. Please note that this test was working smoothly in previous versions.
Code:
asposeLicense.SetLicense(new MemoryStream(Resources.Aspose_Email));
var message = MapiMessage.FromStream(new MemoryStream(Resources.Signed_Opaque_Only));
var convertedToMime = message.ToMailMessage(new MailConversionOptions()
{
ConvertAsTnef = false
});
message.Save(@"c:\test\enc.msg", SaveOptions.DefaultMsgUnicode);
Sample Messages.zip (38.4 KB)