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)