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

Free Support Forum - aspose.com

Email sent using MailMessage configured .msg is missing Text Formatting and missing Images from body of the email

Dear Aspose:
MailMessage configured .msg is missing rich text formatting and also not showing images when seen in Microsoft Outlook.

Can you please look into this issue ASAP and let us know why this is happening.
Below is the code I used with TestCPMail12.msg (Pls. see attached zip file)

MailMessage msgCPMail = MailMessage.load(“TestCPMail12.msg”, new MsgLoadOptions());
MailAddress fromAddress = new MailAddress("testuser1@xyz.com", “test user1”);
MailAddressCollection toAddressCollection = new MailAddressCollection();
msgCPMail.setSubject(“This is test email”);

SmtpClient client = null;


TestCPMail12.zip (90.3 KB)


Please provide your sample code for creating .MSG file for further investigation. We have created the file using the following code sample and it worked.

MailMessage mailMsg = new MailMessage();
            // Set from, to, subject and body properties
            mailMsg.From = "from@domain.com";
            mailMsg.To = "to@domain.com";
            mailMsg.Subject = "subject";
            mailMsg.HtmlBody = "<h3>rtf example</h3><p>creating an <b><u>outlook message (msg)</u></b> file using Aspose.Email.</p>";
            MapiMessage outlookMsg = MapiMessage.FromMailMessage(mailMsg);
            outlookMsg.Save(dataDir + "CreatingMSGFilesWithRTFBody_out.msg");

I think the creation of MSG should be independent of the issue as you can see that the previous attached .msg file, can be opened with outlook and I find that the images and also formatting is intact.

Please try the sample code I provided before, use the attached .msg in there you should be able to see the issue.

Below is the code I used for creating the .msg to begin with but I believe it should not matter as the image and Rich text is visible when opening the .msg file in Outlook but fails to show up in Outlook when the same delivered email is opened in Outlook.

Please get the mhtCPPath I used from the attached file which also contains the final configured file that is sent to recipients.

MapiMessage tmpMsg = MapiMessage.load(mhtCPPath, new MhtmlLoadOptions());
String msgCPPath = “.msg”;
tmpMsg.save(msgCPPath, SaveOptions.getDefaultMsg());

TestCPMail12Send.zip (172.0 KB)


It looks like the issue is with .MSG file. We have tested with other same sort of files (please check sample Sample_MSG.zip (52.2 KB)). We have logged this issue for further investigation under ID “EMAILNET-39113”. You will automatically be notified here once we have more information.

@MuzammilKhan - I am unable to download the Sample_MSG.zip - says “…this file is private…”. Can you please get me access to it.
Thanks for creating the issue, looking forward to a speedy resolution.


Please download now:
Sample_MSG.zip (52.2 KB)
You can also download this from the link given below: https://www.dropbox.com/s/6xu4t6lxprgfqky/Sample_MSG.zip?dl=0

I tried the Sample MSG you gave and the this seems to display the formatting and images correctly in the delivered email.

But, please do note that we are using ASPOSE to transform contents as we need and so it is important that a .msg file once configured needs to deliver contents as intended.
I am hoping you get to the root cause of the issue I reported and fix it as soon as possible.

Please do note that I am using Aspose.Email for Java and Aspose.Words for Java for required data tranformatons.



Thank you for writing back to us.
We are working on this issue and we will update you as soon as we have more information in this regard.

The full procedure used to recreate the issue is:

  1. Using Aspose.Words for Java:
    String docxPath = “TestCPMail2.docx” ; // please get the document from the attachment
    Document doc = new Document(docxPath);
    String mhtPath = docxPath + “.mht”;
    doc.save(mhtPath, com.aspose.words.SaveOptions.createSaveOptions(SaveFormat.MHTML));

MapiMessage tmpMsg = MapiMessage.load(mhtPath, new MhtmlLoadOptions());
String msgCPPath = “.msg”;
tmpMsg.save(msgCPPath, SaveOptions.getDefaultMsg());

This is how the .msg is generated to begin with and then the .msg if loaded into MailMessage object and the email is eventually sent. The sent email fails to retain the Rich text of the attached TestCPMail2.docx and also the email delivered failed to display the inline images in the docx.

Also, please add one more issue: that the Footer info in the docx is not being displayed in the delivered email as expected as I am seeing two footer notes at the end instead of page 1 then footer, then page2 then footer again.

Please add these notes to the issue to your team and I would hope the details provided speeds up issue resolution!

Important Note: Please note that we are expecting a quick resolution of this issue at the earliest as we are dependent on this issue to be resolved for our purchase request to be approved by management.

TestCPMail12.zip (74.2 KB)


Thank you again for such details.
All the details are shared with the team and we are already working on this issue. You will be updated as soon as we have more information to share.

Great, thank you!

@MuzammilKhan - Any update on this.
Please do note that our management needs this fixed for approval of a purchase request for ASPOSE library. Hoping this gets resolved soon.


Thank you for writing back to us.
We are working on this issue and we will update you as soon as we have more information to share.


We have hotfix release for this issue. Please download it from this link:

Moreover, this issue shall be fixed in our next release for Aspose.Email for Java.

Thankyou for fixing this issue promptly, hotfix worked. Likely when is the next release date?
Hoping this issue is going to be in this months release itself. Please clarify.

One issue I noticed is that, the Footer on the first page is missing while the footer on the last page is seen. Please create a separate issue for the first page footer not getting displayed.

Best Regards,


The next release shall probably be available in the first week of next month.
We have recorded the observation related to missing footer at first page and hopefully it shall also be resolved with this issue in next release.

@MuzammilKhan - Sounds like a plan, thank you!


It is requested to please share your TestCPMail2.docx file for investigation of missing footer.

@MuzammilKhan - It is simple word document, you can create it.
Anyways, I am attaching it.
TestCPMail-WithFooter.zip (74.8 KB)


Thank you for providing the require details. We are working on this issue and will update you as soon as we have more information to share.