We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to get MapiMessage Body Types?

Hi,
After loading a ole2 msg message to MapiMessage, need to get the message body type.
MyMapiMessage.BodyType
will always return JUST one type, even if a message has 2 body types (like html and text).
In addition these 3:
MapiMessage.Body.Length
MapiMessage.BodyHtml.Length
MapiMessage.BodyRtf.Length
Are always more than zero for all ole2 msg messages, so that way is also blocked!
Please advise if there’s a way to achieve this?
Thanks.

@australian.dev.nerds

Please use MapiMessageItemBase.BodyType property to achieve your requirement. Please also check BodyContentType.

Could you please share some detail about this query? We will then provide you more information on it.

1 Like

Hello,
Simply to detect all existing email bodies: html, rtf and plain text
For example, one message can be plain and html or html and rtf.
BodyType will only return 1 type, an all those 3: Body.Length, BodyHtml.Length and BodyRtf.Length are always greater than zero!
Thanks

@australian.dev.nerds

You are facing the expected behavior of these properties. Please get the detail of these properties from here: