ContentTransferEncoding Property

ContentTransferEncoding Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Defines the encoding mechanism used when sending an implementing object's contents over the network.

Applies To

IBodyPart Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Property ContentTransferEncoding As String

[C++]HRESULT get_ContentTransferEncoding(BSTRpVal);
HRESULT put_ContentTransferEncoding(BSTR Val);

Parameters

  • pVal
    Returns the value of the ContentTransferEncoding property as a reference to a BSTR.
  • Val
    Sets the value of the ContentTransferEncoding property to the value of the BSTR.

Remarks

The ContentTransferEncoding property corresponds to the Content-Transfer-Encoding Multipurpose Internet Mail Extensions (MIME) header field of RFC 2045.

This property corresponds to the urn:schemas:mailheader:content-transfer-encoding field for the object. You can therefore set this field using the ContentTransferEncoding property on the interface or by updating the value using the Fields collection

Collaboration Data Objects (CDO) defines the following string constants and mechanisms for use with the ContentTransferEncoding property.

CdoEncodingType Module Constants

Constant Value Meaning
cdo7bit "7bit" Simple 7-bit ASCII
cdo8bit "8bit" 8-bit coding with line termination characters
cdoBase64 "base64" 3 octets encoded into 4 sextets with offset
cdoBinary "binary" Arbitrary binary stream
cdoMacBinHex40 "mac-binhex40" Macintosh binary to hex encoding
cdoQuotedPrintable "quoted-printable" Mostly 7-bit, with 8-bit characters encoded as "=HH"
cdoUuencode "uuencode" UUENCODE encoding.

In compliance with RFC 2045, the ContentTransferEncoding property is enforced to be "7bit", "8bit", or "binary" when ContentMediaType indicates a composite content type such as "message" or "multipart". An attempt to encode a composite type with any other mechanism results in an error.

CDO can decode a body part from "mac-binhex40" but cannot encode using this mechanism.

The contents of ContentTransferEncoding are not case-sensitive. The default value is "7bit".

Example

[Visual Basic] Dim iBp as CDO.BodyPart iBp.ContentTransferEncoding = "base64"

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.