Problems retrieving .msg Email attachments when encoded in Base 64. OK on Exchange 2003, but appears to be incomplete on Exch 2007 Sp2 RU4
We currently use an application that monitors a MS Exch 2003 Mailbox. The application uses an IMAP connection to FETCH the Email from the Inbox, insert a few custom X-Headers, and then APPEND this Email to an Alternative folder. Where the received Email has a .msg attachment (it was created and attached in Outlook 2003), this looks to arrive in the Inbox identified as.. Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The application however APPEND's the attachment part of the Email to the new Folder in Base64 format, as below Content-Type: message/rfc822; name="message0004.eml" Content-Transfer-Encoding: base64 Content-Description: message0004.eml Content-Disposition: attachment; filename="message0004.eml" UmVjZWl2ZWQ6IGZyb20gTUNIUDA1N0EuZ2xvYmFsLWFkLm5ldCAoWzE3Mi4yOS4zNy4yN10pIGJ5.... etc... At the end of this we get a "115 OK APPEND completed." message which leads me to believe the Email was correctly received by the Exchange Server. The problem I have is that this is all OK on MS Exchange 2003, we can FETCH the email from the alternative folder and see the contents of the attachment within the application and through Outlook Express. But when using an Exchange 2007 Mailbox, although exactly the same process is followed, with even the same test Email attachment and encoding, the attachment is not present when opened. Looking at a network trace the attachment looks to have no main body or be seen as Base64 encoded, all that is returned is.. Content-Type: message/rfc822 Subject: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 which is certainly not how it was stored. Does anybody have any ideas as to why the .msg Email attachment encoded as Base64 is then not correctly retrieved in Exchange 2007. As mentioned, this is perfectly OK in Exchange 2003 and seems to only affect .msg attachments. I apologise in advance if I have not supplied all the necessary information to resolve this issue, or if I am posting this in the wrong forum. I am a little bit new to posting queries in this fashion.
July 10th, 2010 8:35am

I recommend you post this to the Development forum. -- Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." . "rickyk" wrote in message news:4a7392e1-f4e7-475c-bfbb-7814f826f1be... We currently use an application that monitors a MS Exch 2003 Mailbox. The application uses an IMAP connection to FETCH the Email from the Inbox, insert a few custom X-Headers, and then APPEND this Email to an Alternative folder. Where the received Email has a .msg attachment (it was created and attached in Outlook 2003), this looks to arrive in the Inbox identified as.. Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The application however APPEND's the attachment part of the Email to the new Folder in Base64 format, as below Content-Type: message/rfc822; name="message0004.eml" Content-Transfer-Encoding: base64 Content-Description: message0004.eml Content-Disposition: attachment; filename="message0004.eml" UmVjZWl2ZWQ6IGZyb20gTUNIUDA1N0EuZ2xvYmFsLWFkLm5ldCAoWzE3Mi4yOS4zNy4yN10pIGJ5.... etc... At the end of this we get a "115 OK APPEND completed." message which leads me to believe the Email was correctly received by the Exchange Server. The problem I have is that this is all OK on MS Exchange 2003, we can FETCH the email from the alternative folder and see the contents of the attachment within the application and through Outlook Express. But when using an Exchange 2007 Mailbox, although exactly the same process is followed, with even the same test Email attachment and encoding, the attachment is not present when opened. Looking at a network trace the attachment looks to have no main body or be seen as Base64 encoded, all that is returned is.. Content-Type: message/rfc822 Subject: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 which is certainly not how it was stored. Does anybody have any ideas as to why the .msg Email attachment encoded as Base64 is then not correctly retrieved in Exchange 2007. As mentioned, this is perfectly OK in Exchange 2003 and seems to only affect .msg attachments. I apologise in advance if I have not supplied all the necessary information to resolve this issue, or if I am posting this in the wrong forum. I am a little bit new to posting queries in this fashion. Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
July 10th, 2010 8:44am

Many thanks for your suggestion. I have posted this on the Development Forum.
July 10th, 2010 9:07am

Hi, we have the same problem on E2K10 SP1 RU4. In our case the attached message is eml, not msg. I'm searching your post in Develepod Forum but I don't find it, may you provide my the URL Thanks. Luca
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2011 4:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics