We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue when converting MAPI messages to MIME

Hello,

I am using the following code to convert MAPI messages to MIME:

var mailMessage = msg.ToMailMessage(
new MailConversionOptions
{
ConvertAsTnef = false
});

var meoryStream = new MemoryStream();

mailMessage.Save(
meoryStream,
new EmlSaveOptions(MailMessageSaveType.EmlFormat)
{
PreserveSignedContent = true
});

var mime = meoryStream.ToArray();

If we have a MapiMessage that has an embedded message, the converted MIME has a problem when using Aspose.Email 18.1. The problem is that the message/rfc822 part has a bad Content-Transfer-Encoding. It has a value of base64.

According to https://www.w3.org/Protocols/rfc1341/7_3_Message.html, only “7bit”, “8bit”, or “binary” are allowed here.

This is causing problems when trying to parse the resulting MIME with some 3rd party library.

Please note that this problem does not exist in Aspose.Email 17.12.

The attached file has three files:

Message.msg: the input message
DoneWith17.12.eml: result of converting input message to MIME via Aspose.Email 17.12
DoneWith18.1.eml: result of converting input message to MIME via Aspose.Email 18.1
Messages.zip (13.9 KB)

@bahakh,

Thank you for writing to Aspose support team. We are working on this issue and will share our feedback soon.

@bahakh,

This issue is re-produced and logged under Id: EMAILNET-38912 for further investigation by the product team. You will be automatically notified once any update is received in this regard.

was this issue resolved and published in a new release?

@bahakh,

The fixed version will be available for download in a week time. We’ll update you here as it is released and available to general public for download.

@bahakh,

The issue you have reported here in this thread has been fixed in the latest version of [Aspose.Email for .NET 18.2] (https://www.nuget.org/packages/Aspose.Email/).