Returning Empty HTML Body

Hello,

I am loading one eml file in aspose which has multipart html body.
But aspose object returning null html body and normal body also<a class=“attachment” .
MailMessage message = Aspose.Email.MailMessage.Load(str_emFileName, new EmlLoadOptions());

href="/uploads/default/50263">Richard Giese, claim your shopping credit now_8-2-2021.zip (8.4 KB)

I am uploading the sample eml file and the code where I am loading eml file in aspose.

Thank you in advance.

@navnath44,
Thank you for your query.

Unfortunately, you have not managed to upload the ZIP archive. Please try again.
Also, please specify the version of Aspose.Email you used.

Richard Giese, claim your shopping credit now_8-2-2021.zip (8.4 KB)

Please find the zip.
Aspose version used is 20.1.

@navnath44,
Thank you for the EML file example. Unfortunately, I have not managed to reproduce the error. Please check the issue with the latest version of Aspose.Email. If the error persists, please share the comprehensive code example and a screenshot demonstrating the issue.

Thank you for your response.
Still same issue, Uploading the screenshots.htmlbody.png (101.6 KB)
plainBody.png (101.8 KB)

I am trying with simple test application.

static void Main(string[] args)
{

        string path = "C:\\Users\\navnath\\Downloads\\IML_Samples\\IML_Samples\\msg - Copy.eml";
        MailMessage message = MailMessage.Load(path, new EmlLoadOptions());
        string body_with_url = message.GetHtmlBodyText(true);
        string HtmlBody = message.HtmlBody;
        string PlainBody = message.Body;
    }

@navnath44,
I have not been able to reproduce the issue yet. Please share the “msg - Copy.eml” file if it differs from the “Richard Giese, claim your shopping credit now_8-2-2021.eml” file. Also, please specify the version of the operating system on which the error occurs.

Hello,

There are multiple files with this issue. Which has multipart mime content and html body.
My current OS version is Windows 10 pro 64 bit.
msg - Copy.zip (21.9 KB)

Also sharing the msg-Copy.eml file.

@navnath44,
Thank you for the additional data. I reproduced the problem and received the same results. I’ve logged the issue in our tracking system with ID EMAILNET-40216. Our development team will investigate this case. You will be notified when it is fixed.

@navnath44,
Our development team investigated the issue and found the “msg-Copy.eml” file has been corrupted. As you can see, Outlook cannot display this email correctly as well. Could you share how this file has been created, please? If it has been converted from MSG file via Aspose.Email, please share the initial file and code example reproducing the error.

The file has been generated from msg.iml by reading all the bytes and writing that bytes in eml file.
Chilkat is able to return the body from eml file.
I can share the original .iml file with you.

static void Main(string[] args)
{
byte[] f_bytMailData = File.ReadAllBytes(“C: \Users\navnath\Downloads\test\msg.iml”);

        File.WriteAllBytes("C:\\Users\\navnath\\Downloads\\DcSolution\\DcSolution\\msg.eml", f_bytMailData);

        string path = "C:\\Users\\navnath\\Downloads\\DcSolution\\DcSolution\\msg.eml";
        MailMessage message = MailMessage.Load(path, new EmlLoadOptions());
        string body_with_url = message.GetHtmlBodyText(true);
        string htmlbody = message.HtmlBody;
        string PlainBody = message.Body;

    }

@navnath44,

Please share the IML file so that we can help you.

Here is the original iml file.
msg.zip (14.6 KB)

@navnath44,

The code snippet above just copies the “msg.iml” file to “msg.eml” file. But your files are different. Could you describe how was the “msg.iml” file obtained, please?

msg.iml files are created by IncrediMail mail client.
Even I tried to load the iml files in Aspose.Email.

@navnath44,
Unfortunately, the “msg.iml” file is also corrupted. To help you properly, we need the correct email file.

The iml file is not corrupted chilkat is able to convert these iml files properly.
And these iml files are able to open in mail client.

@navnath44,
Could you share a screenshot of what the IML file you sent should look like, please?