Platform SDK: Exchange 2000 Server

ContentMediaType Property

[This is preliminary documentation and subject to change.]

Contains type and subtype identifiers that specify the nature of the data in a body part.

[Visual Basic]
Property ContentMediaType as String
[C++]
HRESULT get_ContentMediaType(BSTR* pVal);
HRESULT put_ContentMediaType(BSTR Val);
[IDL]
HRESULT [propget] ContentMediaType([out,retval] BSTR* pVal);
HRESULT [propput] ContentMediaType([in] BSTR Val);

Remarks

The ContentMediaType property corresponds to the type and subtype of the Content-Type header field of RFC 2045.

This property corresponds to the urn:schemas:mailheader:content-type header field available in the Fields collection.

The format for the contents of ContentMediaType is "<type>/<subtype>". Common types and subtypes include:

The following CdoContentTypeValues string constants are provided for use with the ContentMediaType property:

CdoContentTypeValues Module Constants

Constant Value Description
cdoGif "image/gif" Image encoded using Graphics Interchange Format (GIF)
cdoJpeg "image/jpeg" Image encoded using Joint Photographic Experts Group format (ISO/IEC 10918)
cdoMessageExternalBody "message/external-body" Pointer to message content outside this message
cdoMessagePartial "message/partial" One piece of a fragmented message
cdoMessageRFC822 "message/rfc822" Simple e-mail message, not even a forward
cdoMultipartAlternative "multipart/alternative" Different versions of same content, simplest first
cdoMultipartDigest "multipart/digest" Different messages, including forwarded messages
cdoMultipartMixed "multipart/mixed" Body parts to be processed sequentially
cdoMultipartRelated "multipart/related" Body parts accessed through URLs
cdoTextHtml "text/html" Text with HTML tags
cdoTextPlain "text/plain" Unstructured text

The contents of ContentMediaType are case-insensitive. The default value is "text/plain".

Example

Dim iBp as CDO.BodyPart
    ' set a bodypart to oBp
iBp.ContentMediaType = "application/msword"