1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00

IMAP: send default BODYSTRUCTURE on MIME encoding error

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@776 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-10-09 23:12:14 +00:00
parent 1a7f3ec005
commit 60a24e5a64

View File

@ -649,6 +649,12 @@ public class ImapConnection extends AbstractConnection {
// no multipart, single body
appendBodyStructure(buffer, mimeMessage);
}
} catch (UnsupportedEncodingException e) {
DavGatewayTray.warn(e);
// dump message in log
DavGatewayTray.debug(new BundleMessage("LOG_MESSAGE", new String(baos.toByteArray())));
// failover: send default bodystructure
buffer.append("(\"TEXT\" \"PLAIN\" (\"CHARSET\" \"US-ASCII\") NIL NIL NIL ").append(baos.size()).append(" NIL)");
} catch (MessagingException me) {
DavGatewayTray.warn(me);
// dump message in log