Free Support Forum - aspose.com

MailMessage.HtmlBodyText in Aspose.Email 17.9 and Aspose.Email 20.10

Hello Aspose support team.

I am using aspose.mail in our project.
And I have a problem like this:

  1. I have a msg file. You can download the file in link below:
    MsgFileTest.zip (10.2 KB)

  2. I use this code to test msg file:

         byte[] bytes = File.ReadAllBytes(@"D:\OutputTestMsgToPDF\Test Shirt Enter and Enter outlook webBrowser.msg");
         using (MemoryStream stream = new MemoryStream(bytes))
         {
             stream.Seek(0, SeekOrigin.Begin);
             // Create an instance of MapiMessage from file
             MailMessage msg = MailMessage.Load(stream);
    
             // Get subject
             Console.WriteLine("This is Aspose.mail.dll version 20.10.0.0");
             Console.WriteLine("Body:\r\n\r\n" + msg.Body);
             Console.WriteLine("-------------");
             Console.WriteLine("Html Body Text:\r\n\r\n" + msg.HtmlBodyText);
             Console.WriteLine("-------------");
    
             Console.WriteLine("Html GetHtmlBodyText(false):\r\n\r\n" + msg.GetHtmlBodyText(false));
             Console.WriteLine("-------------");
    
             Console.WriteLine("html Body:\r\n\r\n" + msg.HtmlBody);
             Console.ReadLine();
         }
    
  3. I did test with Aspose.mail.dll version 17.9.0.0, then I got result in MailMessage.HtmlBodyText like this. see image below:
    image.png (19.8 KB)

    This result is okay from my point of view.

  4. I did test with Aspose.mail.dll version 20.10.0.0, then I got result in MailMessage.HtmlBodyText like this. see image below:
    2021-02-25_14h26_07.png (20.6 KB)

    This result is NOT okay from my point of view. Looks like there is a bug in
    MailMessage.HtmlBodyText in Aspose.mail.dll 20.10.0.0 version

Can you please check this problem soon for me?
I just want to know if the problem I had in MailMessage.HtmlBodyText in Aspose.mail.dll 20.10.0.0 version is a bug or not.
If it is a bug, what is your plan to fix it?

Thank you very much for your checking and answer.

Yours,
Nghia

@nguyen.xuan.nghia,
Thank you for the issue description. I reproduced the problem and got the same results. I have logged the issue in our tracking system with ID EMAILNET-40125 for further investigation. I will let you know about any progress and estimated time for a bugfix if it is a bug. We also promise to improve the documentation.

The fix has been released with Aspose.Email 21.2.