Converting multiple alternate views of MailMessage to MapiMessage

Hi

The MailMessage java object can have a collection of alternate views. Is there a way to create a MapiMessage from MailMessage that displays all the alternate views?

Thanks

Hello @gs01,

Thank you for contacting the support forum.

The MailMessage represents an email message in MIME format. On the other hand, MapiMessage relates to Microsoft Outlook’s MAPI format.
In the context of MAPI (Messaging Application Programming Interface), there isn’t a concept specifically termed “Alternate Views.” However, MAPI does support features, such as plain text, HTML, and attachments.

When dealing with email messages in MAPI, you typically work with properties to access and manipulate message content. This includes text bodies, HTML bodies, attachments, and other properties associated with the message.

Hi

So are there any properties we could use to display all html bodies in a MapiMessage?

Thanks

Hello,

You can access HTML body of message using the MapiMessage.BodyHtml property.

Hi

Could you please advise how I can use that property in Java code to make the MapiMessage display all the multiple HTML bodies.

Thanks

Hello @gs01.

Sorry, but we are not entirely clear on your request.

In the context of email messages, an EML message does not have multiple HTML bodies.

The EML format is based on MIME (Multipurpose Internet Mail Extensions) and follows its structure. MIME allows messages to have multiple parts, each with its content type (such as text/plain for plain text and text/html for HTML content) and content. However, in practice, most email messages consist of one main body part: plain text or HTML.

While MIME technically allows for messages with multiple HTML parts, it’s not a common practice in standard email communication. Multiple HTML bodies in a single email message would generally be redundant and unsupported by email clients and Aspose.Email.

In most cases, an email message in the EML format will contain a single HTML body part and other optional parts such as attachments or alternative text representations (like plain or rich text).