IncomingEmailMessage.htmlMessageBody

Returns the message body as either HTML or text. Gives the same results as through the parent interface, EmailMessage.htmlBody and EmailMessage.textBody.

If the message was multipart/alternative, both of these will be populated with content from the message. They are supposed to be both the same, but not all senders respect this so you might want to check both anyway.

If the message was just plain text, htmlMessageBody will be null and textMessageBody will have the original message.

If the message was just HTML, htmlMessageBody contains the original message and textMessageBody will contain an automatically converted version (using arsd.htmltotext). textAutoConverted will be set to true.

Meta

History

Were public strings until May 14, 2024, when it was changed to property getters instead.