Platform SDK: CDO for Windows 2000

Example 1: Alternative Representations of a Message

Many messages are commonly sent with alternative representations in Hypertext Markup Language (HTML) and plain text (plain text to allow down-level mail programs to properly interpret and present the message). To support these alternative representations, the message is formatted using MIME. The hierarchy of CDO objects for such a message is illustrated in the following figure:

Alternative Representation Body Part Hierarchy

Note that in this case, the Message object is itself a body part with Content-Type equal to multipart/alternative. Because of this, its content stream is empty. Its IBodyPart.BodyParts collection has two items, which are both BodyPart objects. Each child body part has a content stream with one of the alternative representations of the message.

See Also

IBodyParts Interface