We use Aspose.Email to load eml files, convert the MailMessage to MapiMessage for mail processing, and finally save it back to eml file.
Our code is like:
MailMessage emlmailmsg = MailMessage.Load(stream);
var mapimsg= MapiMessage.FromMailMessage(emlmailmsg, new MapiConversionOptions(OutlookMessageFormat.ASCII));
When we open the saved testoutput.eml file in VS code, we found the Content-Transfer-Encoding is set to “quoted-printable”, which seems to make the dots “.” encoded as “=2E” in the mail body:
Content-Type: text/plain; charset="utf-8"
Subject: Email 1: (Internal use only) with Protected attac=
Is there a way for us to change the value of Content-Transfer-Encoding so that the characters in the output mail body are not encoded?
The input eml file is like this and we hope the output can be the same:
Content-Type: text/plain; charset="us-ascii"
Subject: Email 1: (Internal use only) with Protected attachment
Troubleshooting we have taken:
1, If we directly save as eml file before calling MapiMessage.FromMailMessage, it maintains the original Content-Transfer-Encoding value and text is not encoded. So it seems MapiMessage.FromMailMessage changes the Content-Transfer-Encoding to “quoted-printable”.
2, If we call mapimsg.ToMailMessage to convert it back to MailMessage and save, the result is the same.
I have observed the issue shared by you and request you to please try using latest Aspose.Email for .NET 20.1 on your end. In case the issue is still persisting then please share the source MSG file and EML output obtained that we will investigate further on our end to help you out.
Thanks for the quick reply. Yes I tried with latest release and the issue was still there.
Just to clarify, did you mean that you could reproduce the issue or not? I will check further to see if we could share the eml file, but I am guessing if you modify your eml file and replace the mail body with what I pasted before, and use the same code workflow, can you reproduce the issue?
The input is eml file and output is also eml file.
Thank you for sharing the source file. I have worked over it using Aspose.Email for .NET 20.1 on my end and have observed encoding limitations mentioned by you. I have created an issue with ID EMAILNET-39740 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be addressed.
Thanks a lot!
As our release of the project might be impacted of this, just wondering normally how long it might need to get a fix if this is a product issue? If any ETA could be shared, that is much appreciated.
I like to share that the issue has just been added in our issue tracking system and we request for your patience in this regard. We will share the good news with you as soon as the issue will be fixed.