Aspose.Email.Mail.MailMessage delivers wrong BodyType

Hi,

With our application we are archiving emails via IMAP using Aspose.Email (17.1.0.0).

If an email is formatted in RTF, I get as BodyType “PlainText”. Is this an error or does Aspose internally convert the body?

CurrentMessage = Client.FetchMessage(this.CurrentItem.UniqueId);
Aspose.Email.Outlook.BodyContentType bodyType = CurrentMessage.BodyType;

Is there another way to find out the body type of the original email?

Best Regards

Hi,


Thank you for writing to Aspose Support team.

The expected behavior in this case is that API should convert it to HTML and we have verified the same at our end by fetching a similar message from Exchange server. The message body type is shown as HTML and not as Text. Please try it with the latest version of the API and let us know your feedback.

Hello,

I tried version 17.2.0.0, but I get the same result: The
e-mail formatted in rich text format, after I fetch the message with
Aspose via IMAP I get the BodyType “PlainText”.

I do not use Exchange, but hmailserver as mail provider.

Hi,


I have tested the scenario again and observed that BodyType is Html for RTF formatted messages. You may please create three messages files in all the three formats i.e. Html, Rtf and plain text and save on disc. Then send these messages and on the receiving end fetch these messages and save on disc. Please send us all the six messages i.e. 3 before sending and 3 after receiving. These sample messages may help us to analyze the problem and provide assistance accordingly.

Hi,

as attachments I am sending you the desired emails that I made with Outlook.

Best Regards

Hi,


Thank you for providing the sample emails. I am afraid that still I am not able to re-produce the issue. Here a sample project and output image is attached which uses your sample emails. Both the rich text files return Html type instead of plain text. Could you please give it a try and share the feedback?

Hi,

I see that your code funtions correctly.

My problem occurs,when I am downloading from an IMAP server an email that is in rich text format . Then, as I said before, I get as BodyType plainText.

ImapClient client = new ImapClient();

CurrentMessage = client.FetchMessage(this.CurrentItem.UniqueId);

Best regards

Hi,


I am afraid that I have already tested it after fetching it from Imap server and observed no issue. In the previous post I requested you to send me the mails after fetching from Imap server and tested those saved messages for BodyType. That test also returned BodyType as Html which proves that Aspose.Email extracted the message body type correctly .

It seems specific issue with either your program or the Imap Server. You may please arrange a temporary test account on the said IMAP server and share the credentials with us. Also send us a simple console application which uses those credentials and can be compiled and executed here to re-produce the scenario and provide assistance accordingly.