Hi,
I'm trying to read mails from MS Exchange 2010 that have multipart/mixed content type and contain only one text/html part. I'm using IMAP and the newest Javamail 1.4.3. The mail processing fails when trying to fetch the bodystructure. I can process the same message perfectly well from Exchange 2003:
BODYSTRUCTURE from Exchange Server 2003 (Works fine with javamail)
* 1 FETCH (BODYSTRUCTURE (("TEXT" "HTML" ("charset" "UTF-8") NIL NIL "7BIT" 242 5 NIL ("inline" NIL) NIL) "mixed" ("boundary" "----=_Part_28_1466852274.1263305065649") NIL NIL))
BODYSTRUCTURE from Exchange Server 2010 (Does not obey specification, doesn't work with javamail)
* 1 FETCH (BODYSTRUCTURE ("multipart" "mixed" ("boundary" "----=_Part_1_1045289550.1263292469650") NIL NIL NIL 0 NIL NIL NIL NIL))
Does anyone have same kind of problems? This seems to me like a bug in Exchange 2010, but does anyone know any work-around for this other than using POP3 that works with the same message?
Here's the message (slightly edited to protect the guilty):
Received: from XXX (10.1.2.152) by
YYY (10.1.3.154) with Microsoft SMTP Server id
14.0.639.21; Tue, 12 Jan 2010 12:34:29 +0200
From: "XXX@YYY" <XXX@YYY>
Reply-To: <XXX@YYY>
To: Receiver <XXXX@YYY>
Message-ID: <1765234390.11263292469652.JavaMail.XXX@YYY>
Subject: Phone order: Mobile phone for mobile employees
Content-Type: multipart/mixed;
boundary="----=_Part_1_1045289550.1263292469650"
Return-Path: ZZZ@YYY
Date: Tue, 12 Jan 2010 12:34:29 +0200
X-MS-Exchange-Organization-AuthSource: XYZ
X-MS-Exchange-Organization-AuthAs: Anonymous
MIME-Version: 1.0
------=_Part_1_1045289550.1263292469650
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><p>
I would like to order the following phone:
<br><br>Mobile phone for mobile employees
</p>
<p>
Best regards,
<br>XXX@YYY
</p>
------=_Part_1_1045289550.1263292469650--
Cheers,
Kai