IMAP: fix 3441891, workaround for Exchange 2003 ActiveSync bug

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1963 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2012-05-22 22:22:37 +00:00
parent 0a11da2b0f
commit 6c8cef4d17
1 changed files with 6 additions and 0 deletions

View File

@ -1778,6 +1778,12 @@ public abstract class ExchangeSession {
mimeBody = new SharedByteArrayInputStream(getContent(this));
mimeMessage = new MimeMessage(null, mimeBody);
mimeBody.reset();
// workaround for Exchange 2003 ActiveSync bug
if (mimeMessage.getHeader("MAIL FROM") != null) {
mimeBody = (SharedByteArrayInputStream)mimeMessage.getRawInputStream();
mimeMessage = new MimeMessage(null, mimeBody);
mimeBody.reset();
}
LOGGER.debug("Downloaded full message content for IMAP UID " + imapUid + " (" + mimeBody.available() + " bytes)");
}
}