Configure content transfer encoding

Applies to: Exchange Server 2013

Content transfer encoding defines encoding methods for transforming binary email message data into the US-ASCII plain text format. This transformation allows the message to travel through older SMTP messaging servers that only support messages in US-ASCII text. Content transfer encoding is defined in RFC 2045. The transfer encoding method is stored in the Content-Transfer-Encoding header field in the message. In Microsoft Exchange Server 2013, the following content transfer encoding methods are available:

  • 7-bit: This value indicates that the message body data is already in the US ASCII plain text format, and no message encoding has been done to the message.

  • Quoted-printable (QP): This encoding method uses printable US-ASCII characters to encode the message body data. If the original message text is mostly US-ASCII text, QP encoding gives somewhat readable and compact results. By default, Exchange 2013 uses QP for encoding binary message data.

  • Base64: This encoding method is based primarily on the privacy-enhanced mail (PEM) standard defined in RFC 1421. Base64 encoding uses the 64-character alphabet encoding method and output padding characters defined by PEM to encode the message body data. Base64 encoding creates a predictable increase in message size and is optimal for binary data and non-US-ASCII text.

You configure the transfer encoding method using the ByteEncoderTypeFor7BitCharsets parameter on the Set-OrganizationConfig and Set-RemoteDomain cmdlets. The content transfer encoding settings you configure with Set-OrganizationConfig apply to all messages in the Exchange organization. The content transfer encoding settings you configure with Set-RemoteDomain apply only to message sent to external recipients in the remote domain.

The following table lists the values that you can use to set the transfer encoding method.

Parameter in Set-OrganizationConfig Parameter in Set-RemoteDomain Description
0 Use7Bit Always use 7-bit encoding for HTML and for plain text. This is the default value.
1 UseQP Always use QP encoding for HTML and for plain text.
2 UseBase64 Always use Base64 encoding for HTML and for plain text.
5 UseQPHtmlDetectTextPlain Use QP encoding for HTML and for plain text unless line wrapping is enabled in plain text. If line wrapping is enabled, use 7-bit encoding for plain text.
6 UseBase64HtmlDetectTextPlain Use Base64 encoding for HTML and for plain text, unless line wrapping is enabled in plain text. If line wrapping is enabled in plain text, use Base64 encoding for HTML, and use 7-bit encoding for plain text.
13 UseQPHtml7BitTextPlain Always use QP encoding for HTML. Always use 7-bit encoding for plain text.
14 UseBase64Html7BitTextPlain Always use Base64 encoding for HTML. Always use 7-bit encoding for plain text.

For more details about Content-Transfer-Encoding header field, see the "Understanding the structure of email messages" section in Content conversion.

For more information about remote domains, see Remote domains.

What do you need to know before you begin?

  • Estimated time to complete: 15 minutes

  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Transport service" entry in the Mail flow permissions topic.

  • For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard shortcuts in the Exchange admin center.

Tip

Having problems? Ask for help in the Exchange forums. Visit the forums at Exchange Server.

Use the Shell to configure the content transfer encoding method for the organization

To configure the content transfer encoding method for the organization, run the following command:

Set-OrganizationConfig -ByteEncoderTypeFor7BitCharsets <Integer>

For example, to set the content transfer encoding method to Base64, run the following command:

Set-OrganizationConfig -ByteEncoderTypeFor7BitCharsets 2

Use the Shell to configure the content transfer encoding method for a remote domain

To configure the content transfer encoding method for all the recipients in a remote domain, run the following command:

Set-RemoteDomain -ByteEncoderTypeFor7BitCharsets <Value>

For example, to set the content transfer encoding method to Base64, run the following command:

Set- RemoteDomain -ByteEncoderTypeFor7BitCharsets UseBase64

How do you know this worked?

To verify that you have successfully configured the method for content transfer encoding, do the following:

  1. Send a test message that contains a mixture of US-ASCII text and binary data or non-US-ASCII text to an internal or external test account. Use an internal account to test organization settings, and an external account in the remote domain to test remote domain settings.

  2. In an email client, view the Content-Transfer-Encoding header field in the message, and verify the content transfer encoding method that was used on the message matches the method you configured.