Article ID: 969854 - Last Review: April 21, 2009 - Revision: 1.0

The body of a message is shown incorrectly as an attachment if you try to use an application in an Exchange Server 2007 environment to send a message that includes attachments

Expand all | Collapse all

SYMPTOMS

An e-mail message that has an attachment is sent from an application in a Microsoft Exchange Server 2007 environment. The e-mail message also has a text body part that is specified after the attachment body part. When a user receives the e-mail message, the body of the message is shown incorrectly as an attachment together with the attachment that is sent by the application. When this issue occurs, the message that is sent from the application is displayed as follows:
MIME-version: 1.0
Content-type: multipart/mixed; boundary="exchange"

This is a message with multiple parts in MIME format.
--exchange
Content-type: application/octet-stream
Content-transfer-encoding: base64

PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
--exchange
Content-type: text/plain

This is the body of the message.
--exchange--
This issue occurs when an attachment body part in an e-mail message is sent before the message body part of the e-mail message is sent. This issue occurs because the message is sent by the application in an incorrect format. Based on the "Mixed Subtype" definition that is mentioned in section 5.1.3 of RFC 2046, the "mixed" subtype of "multipart" is intended for use when the body parts are independent and have to be bundled in a particular order. Any "multipart" subtypes that an implementation does not recognize must be treated as being of "mixed" subtype.

RESOLUTION

If you change the order of the body parts in the application, the issue will be resolved. In this case, the correct order of the e-mail message should be shown as follows:
MIME-version: 1.0
Content-type: multipart/mixed; boundary="exchange"

This is a message with multiple parts in MIME format.
--exchange
Content-type: text/plain

<This is the body of the message.>

--exchange
Content-type: application/octet-stream
Content-transfer-encoding: base64

PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
--exchange--

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

APPLIES TO
  • Microsoft Exchange Server 2007 Enterprise Edition
  • Microsoft Exchange Server 2007 Standard Edition
Keywords: 
kbsurveynew kbtshoot kbexpertiseinter KB969854
 

Article Translations

 

Related Support Centers