Messaging with CDOEX
Topic Last Modified: 2006-06-12
You can use the CDO for Exchange 2000 Server (CDOEX) Component Object Model (COM) component provided by Microsoft® Exchange Server 2007 to manage all aspects of message construction and manipulation. Like its predecessor, Collaboration Data Objects (CDO) for Microsoft Windows® server operating systems, you can use CDOEX to construct, process, and respond to messages formatted according to the Internet standard RFC 822 and Multipurpose Internet Mail Extensions (MIME) specifications. Such formats are the native storage formats for messages in the Exchange store.
Messages, like other non-folder items in an Exchange store repository, consist of a stream of data and a set of associated properties defined by the various messaging content classes. Working directly with the properties might satisfy the needs of your application. For example, working with the properties would suffice if you are working with simple messages that contain only United States (US)-ASCII text or HTML and have no attachments. You can use Microsoft ActiveX® Data Objects (ADO) or OLE DB to create and transmit such messages, leaving the stream construction to Exchange.
In the case of existing messages in the Exchange store, you can also rely solely on the message item's properties for your application. However, if you need to manipulate or send more complex messages, such as those with attachments or MIME-formatted bodies, you must be able to parse, interpret, or construct the message's associated MIME stream. ADO provides access to the item's properties and stream, but does not provide any facilities for the management of the item's stream. The CDOEX messaging components provide this functionality.