Platform SDK: CDO for Windows 2000 |
The following COM classes are provided with the Microsoft CDO for Windows 2000 COM component:
COM Class | CoCreateable
(New) |
Description |
---|---|---|
Message | Yes. | Used to manage a message. Each Message object exposes the IMessage, IBodyPart, and IDataSource interfaces. |
BodyPart | No. | Used to manage a message body part. Each object exposes the IBodyPart interface. |
BodyParts | No. | A collection of message body parts. Each object exposes the IBodyParts interface. |
Configuration | Yes. | Used to manage the configuration for a Message object. Each object exposes the IConfiguration interface. |
DropDirectory | Yes. | Used to gather messages from a file system folder. Each object exposes the IDropDirectory interface. |
Messages | No. | Used to manage a collection of messages in a file system folder. Each object exposes the IMessages collection. |
Only Message, Configuration, and DropDirectory objects can be created directly using the New operator in Visual Basic, CoCreateInstance in C++, or CreateObject in VBScript. The other objects only exist within the context of the top-level, directly created objects.
The class hierarchies for CDO for Windows 2000 are as follows:
BodyParts (Collection)
BodyParts (Collection)
Attachments (Collection)
Messages (Collection)
The Message object hierarchy is modeled one-to-one with RFC 821 and the related MIME RFCs. If the message is formatted using UUENCODE, the depth of the BodyPart hierarchy will be either zero or one.
The CDO for Windows 2000 class hierarchy defines shortcuts to the most commonly used message BodyPart objects:
HTMLBodyPart (HTML message content)
TextBodyPart (Plain-text message content)
The HTML and text BodyPart objects can be retrieved if they exist somewhere within the BodyPart object hierarchy of the Message object. For example, consider the following body part hierarchy:
message multipart/mixed multipart/alternative text/plain text/html image/gif (content-disposition: attachment) application/msword (content-disposition: attachment)
In this case, the object hierarchy would be as depicted in the following diagram.
Message (multipart/mixed) BodyParts (Count = 3) BodyPart (multipart/alternative) BodyParts (Count = 2) BodyPart (text/plain) BodyPart (text/html) BodyPart (image/gif) (Attachment) BodyPart (application/msword) (Attachment)
The BodyPart objects returned by HTMLBodyPart and TextBodyPart are marked in bold-italic typeset in the following diagram. The BodyPart objects returned in the Attachments collection are marked with bold and have the text (Attachment) on the same line.
Messages with attachments encoded using UUENCODE always have a body part hierarchy depth of one:
Message BodyParts (Count = 3) BodyPart (text/plain) BodyPart (attachment 1) BodyPart (attachment 2)
The objects that appear in the Message object's Attachments collection are marked with bold.