I’m using the following test code with Aspose.Network 5.1 to save a MailMessage with special characters:
MailMessage msg = new MailMessage(); msg.PreferredTextEncoding = Encoding.Unicode; msg.To.Add("email@example.com"); msg.From = "firstname.lastname@example.org"; msg.Subject = "Russian (русский язык)"; msg.HtmlBody = "Russian (русский язык, transliteration: russkiy yazyk, Russian pronunciation: [ˈruskʲɪj jɪˈzɨk], meaning 'Russian tongue [language]') is the most geographically widespread language of Eurasia."; msg.Save("c:\\temp\\savedmessage.msg", MailMessageSaveType.OutlookMessageFormatUnicode);
When I open the resulting msg file in Outlook 2007, the subject has correct characters but the body reads:
"Russian (ðóññêèé ÿçûê, transliteration: russkiy yazyk, Russian pronunciation: [?rusk??j j??z?k], meaning 'Russian tongue [language]') is the most geographically widespread language of Eurasia."
It seems as though the body encoding is incorrectly applied during the Save(). If I debug and inspect the property values, the Visual Studio debugger displays the correct characters.
Note that this issue persists even if I load the MailMessage into a MapiMessage and then Save. I've also tried using Streams to save the resulting msg, this problem remains.
Please help as we are licensed for Aspose.Total and this functionality is critical to our project.