Microsoft KB Archive/323489

= A description of Base64 MIME content transfer encoding =

Article ID: 323489

Article Last Modified on 5/31/2007

-

APPLIES TO


 * Microsoft Exchange Server 2000 Service Pack 1
 * Microsoft Exchange 2000 Server Service Pack 2
 * Microsoft Exchange Server 5.5 Standard Edition

-



This article was previously published under Q323489



SUMMARY
An e-mail message that is sent by using Microsoft Exchange Server may be encoded in Base64 Multipurpose Internet Message Extensions (MIME) content transfer encoding. Because of the Base64 encoding algorithm, a message or attachment cannot be read if it is not decoded first. However, this increases the message size by about 33 percent.



MORE INFORMATION
The Base64 encoding semantics are described in Request for Comments (RFC) 2045. This standard proposes that the algorithm be used to transport binary data over a transport that can only handle 7-bit data. To encode the data, a group of three bytes is converted into four 6-bit numbers. Each 6-bit number is then replaced by the corresponding US-ASCII character in the Base64 alphabet. Carriage Return Line Feed (CRLF) characters are inserted into the output stream to keep the line lengths less than 76 characters. When there is one extra byte, the 3-byte group is created by appending two 0-value bytes; two encoded characters are generated, and two equal sign (=) characters are appended. When there are two extra bytes, the 3-byte group is created by appending one 0-value byte; three encoded characters are generated, and one equal sign (=) character is appended.

Base64 encoding in Exchange Server
Base64 encoding is used in the following situations:
 * If you send a message that contains characters that are outside the 7bit US-ASCII range. Exchange Server is a 7-bit Simple Mail Transfer Protocol (SMTP) transport. To send an 8-bit message, the message must be encoded in Base64, and then sent by using SMTP.
 * If you send a message that contains 25 percent or more 8-bit characters.

Base64 encoding in Microsoft Exchange 2000 Server
Base64 encoding is used in the following situations:  If you send an SMTP message that has an attachment. For example:

--_=_NextPart_001_01C211A6.C0897AD3 Content-Type: text/plain; charset=&quot;US-ASCII&quot; Content-Transfer-Encoding: quoted-printable

--_=_NextPart_001_01C211A6.C0897AD3 Content-Type: text/plain; name=&quot;testattach.txt&quot; Content-Transfer-Encoding: base64 Content-Description: testattach.txt Content-Disposition: attachment; filename=&quot;testattach.txt&quot;

naXZlIG91dCB5b3VyIHBhc3N3b3JkIG9yIGNyZWRpdCBjYXJkIG51bWJlciBpbiBh biBpbnN0YW50IG1lc3NhZ2UgY29udmVyc2F0aW9uLg0KICANClZlcm9uaWNhIFJ5YW4gKFZvbHQ DQpoaSBhZGUNClZlcYSBSeWFuIChWb2x0KSBzYXlzOg0KaSBoYXZlIGEgcHJl bWllciBjYWxsYmFjaw0KQWRlIEZhbW90aSBzYXlzOg0KSSJtIG9uIHRoZSBwaG9uZSB3aXRoIGE

The second part of the MIME headers indicates that the SMTP attachment (testattach) was sent by using the Base64 encoding algorithm. Attachments that are sent to the Internet are always encoded as Base64 in Exchange 2000. If you send a message that uses characters from certain character sets in the message body. Messages that use character sets from the following code pages are encoded as Base64 messages when they are sent from an Exchange 2000 computer:  Shift-JIS EUC-KR ISO-2202-JP BIG5</li> ISO-2202-KR</li> GB18030</li> GB2312</li></ul> </li></ul>

Additional query words: XCON

Keywords: kbinfo KB323489

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.