Platform SDK: CDO for Windows 2000

Example 3: Alternative with MHTML Formatting

In many cases, it may be desirable to send images, style sheets, scripts, and other related materials along with the message to allow clients to properly render the HTML formatted message. In such cases, you can format the message using MIME Encapsulation of Aggregate HTML Documents (MHTML). In this case, the body part hierarchy is a bit more complex, as shown in the following figure:

Alternative Representation with MHTML Formatting

In these examples, instances of the Message and BodyPart COM classes form the hierarchy of objects.

There is a one-to-one correspondence between a message body part and a CDO messaging class instance (object). An instance of the Message COM class always acts as the root of the message body part hierarchy, and BodyPart class instances act as the body parts themselves.