2.2.3.3.2.1 Selecting the Primary Message Text MIME Element

When alternative text MIME elements are present and eligible for use as the message body, as specified in section 2.2.3.3.2, MIME readers SHOULD choose a MIME element to populate the message body text by using the following content types, in descending order of preference:

  • "text/HTML"

  • "text/enriched"

  • "text/plain"

  • "text/calendar" (but only if the METHOD property value of the "text/calendar" body part is PUBLISH, REQUEST, REPLY, or CANCEL)

If "text/HTML" is selected, MIME readers copy the MIME element body text to the value of the PidTagHtml property ([MS-OXCMSG] section 2.2.1.58.9), map the charset parameter of the MIME element's Content-Type header to a code page, and set the value of the PidTagInternetCodepage property ([MS-OXCMSG] section 2.2.1.58.6) to that code page. If the charset parameter is not present, MIME readers MAY use the value of a Content-Type META element in the HTML document but SHOULD verify its validity before using it.

If "text/plain" is selected, MIME readers convert the plain text to the UTF-16LE scheme and write the resulting text to the value of the PidTagBody property ([MS-OXCMSG] section 2.2.1.58.1). MIME readers SHOULD, in addition, map the value of the charset parameter of the MIME element's Content-Type header to a code page and set the value of the PidTagInternetCodepage property to that code page.

If "text/enriched" is selected, MIME readers convert the MIME element body text to either "text/plain", "text/HTML", or "text/RTF" and handle that as previously specified. The conversion of enriched text format to other formats is specified in Appendix B of [RFC1896].

If both "text/HTML" and "text/calendar" body parts are present and eligible for use as a message body, instead of writing text to the PidTagHtml property, MIME readers SHOULD convert the HTML text to RTF and write it to the value of the PidTagRtfCompressed property ([MS-OXCMSG] section 2.2.1.58.4). Alternatively, MIME readers can choose to use plain text from a "text/plain" body part or from data in the "text/calendar" body part, as specified in [MS-OXCICAL]. MIME readers MUST NOT set the PidTagHtml property on a calendar or meeting Message object.