Issue with RTF - EML converting to HTML

When dealing with RTF Eml emails, converting the Eml message to mapi message generates a message of type HTML instead of RTF. Using

Here is the code to reproduce:

var rtfEmlMessage = File.ReadAllBytes(@“EmlTestMessage.eml”);

           var mimeRtfMessage = MimeMessage.Load(new MemoryStream(rtfEmlMessage));
        
           var ms = new MemoryStream();

           mimeRtfMessage.WriteTo(FormatOptions.Default.Clone(), ms);

           var mimeRtfMessageToMapiMessage = MapiMessage.Load(ms, new EmlLoadOptions());
        
           Assert.IsTrue(mimeRtfMessageToMapiMessage.BodyType == BodyContentType.Rtf); // fails

Attached is the sample message.

EmlTestMessage.zip (986 Bytes)

@bahakh,

MailMessage API converts RTF messages to Html for message body and doesn’t support RTF. It is a known behavior of the API.

Thank You. You can close this issue then

You are welcome.