1.3.1 Data Models

Message objects model e-mail messages and other PIM objects after a business memo: there is a single message body (2) with zero or more attachments and zero or more recipients (2). Each Message object has a message class property that indicates its type and an arbitrary collection of properties. Attached messages allow for the nesting of content.

MIME, in contrast, models e-mail messages as a nested set of MIME entities, each of which has headers and a (possibly empty) body. No entity is distinguished as the message body (2). The Content-Type header indicates the type of each body part; other headers indicate whether a body part is intended as a message body or an attachment. Recipients (2) are modeled by e-mail addresses in certain headers on the top-level body part. Multipart body parts allow for grouping and nesting of content, including attached messages.

How the parts of each data model correspond is shown, at a high level, in the following table.


Message object

E-mail address




Body part

Message body

Body part


At the next level of detail, some problems become apparent. Because the data models do not match exactly, it becomes more difficult to convert lower-level items between the Message object and MIME formats.

One of the challenges in mapping the Message object content to the MIME format comes from the need to generate human-readable text. A Message object property can be of a data type, such as a binary large object (BLOB), that does not lend itself to representation as text. Two solutions are available for this problem:

  1. Generate a pure MIME message, in which data that does not lend itself to representation in MIME format is simply omitted from the MIME representation.

  2. Generate a Transport Neutral Encapsulation Format (TNEF) message, in which data that does not lend itself to representation in MIME format is placed in a TNEF body part with a Content-Type header of "application/ms-tnef".

Challenges in mapping MIME content to Message objects include distinguishing the message body from attachments, analyzing multipart structures that do not fit the Message object data model, and mapping headers or header parameters that do not have any corresponding property.

Each Message object has a single character set (although nested Message objects can have different character sets). MIME, on the other hand, permits the character set of each header and message body to be specified separately.

A wide variety of possible structures exist for MIME messages. One particular structure carries a TNEF MIME element, which provides a high level of fidelity to the original Message object content. All TNEF messages have the same structure, as follows:

  • At the top level, a MIME entity with a Content-Type headerĀ  value of "multipart/mixed" that specifies all address elements, as well as the following two child entities:

    • A MIME entity with a Content-Type headerĀ  value of "text/plain" that contains a plain text rendering of the message body (2).

    • A MIME entity with a Content-Type header value of "application/ms-tnef" that contains all attachment content and the Hypertext Markup Language (HTML) or Rich Text Format (RTF) message body (2). Any Message object properties for which no mapping to MIME headers is defined is encoded as specified in [MS-OXTNEF].

Because a TNEF message is a MIME structure, MIME messages without a TNEF element are sometimes referred to as pure MIME messages to distinguish them from TNEF messages.