Hello,
I get Mails via Microsoft.Exchange.Data.Transport.MailItem and want store them as msg files. What I did is-
1. I send a RTF or Plain Text mail (having body and attachment both) through Microsoft Outlook and save that mail in an .eml file (RTF.eml, attached with this thread), load the .eml file through Aspose.Network.Mail.MailMessage.Load() method. After loading I used .save() method to convert that .eml file to .msg file. I am able to successfully convert the .eml file to .msg file and when I open the .msg file I could see both Body as well as attachment.
2. But when I send a HTML mail (having body and attachment both) through Microsoft Outlook and save that mail in an .eml file (HTML.eml, attached with this thread), load the .eml file through Aspose.Network.Mail.MailMessage.Load() method. After loading I used .save() method to convert that .eml file to .msg file. I am able to successfully convert the .eml file to .msg file and when I open the .msg file I could only see the attachment. There is no body at all.
Please find the attachment which consists of a testFiles.rar file which contains both .eml files. With RTF.eml file there is no problem at all and both body as well as attachment is coming properly when converted in .msg file while with HTML.eml only attachment is coming when converted in .msg format.
Any suggestions how to resolve this problem ?
Thanks
Atul