Platform SDK: CDO for Windows 2000 |
Fields for instances of the Message Component Object Model (COM) class reside in the urn:schemas:mailheader:, urn:schemas:httpmail:, and the http://schemas.microsoft.com/exchange/ Uniform Resource Identifier (URI) namespaces. All fields within these namespaces can be used to examine or modify not only the mail header fields for the message, but also the message itself.
Although the number of namespaces appears large, the underlying information is the same for many fields within different namespaces, and all that differs between them is the variable type in which they are returned. In general, every message header field for a Message object can be accessed within the urn:schemas:mailheader: namespace, but all are returned as US-ASCII strings with any non US-ASCII characters encoded according to RFC 1522. Associated fields within the urn:schemas:httpmail: namespace and the http://schemas.microsoft.com/exchange/sensitivity field return the same information but in a different format: within the urn:schemas:httpmail: namespace, fields are returned as either RFC 1522 decoded UNICODE characters (that is, not RFC 1522 encoded US-ASCII character sequences) or Automation DATE variables (that is, rather than US-ASCII strings). The http://schemas.microsoft.com/exchange/sensitivity field returns an enumerated value rather than a string, which represents the sensitivity of the message.
Note When accessing fields in the urn:schemas:mailheader: namespace, the underlying OLE DB type for the majority of fields is DBTYPE_STR (a char
string); however, the Microsoft® Active X® Data Objects (ADO) Fields collection is dual, and therefore compatible with Automation. This means that single-byte characters must be returned as wchar_t
(UNICODE, or two byte) characters. This does not mean, however, that non US-ASCII characters encoded per RFC 1522 are subsequently decoded when returned. The encoding characters remain intact.
urn:schemas:mailheader: Namespace