diff --git a/src/java/davmail/imap/ImapConnection.java b/src/java/davmail/imap/ImapConnection.java index 35ff0954..40cb4840 100644 --- a/src/java/davmail/imap/ImapConnection.java +++ b/src/java/davmail/imap/ImapConnection.java @@ -615,6 +615,9 @@ public class ImapConnection extends AbstractConnection { appendBodyStructure(buffer, mimeMessage); } } catch (MessagingException me) { + DavGatewayTray.warn(me); + // dump message in log + DavGatewayTray.debug(new BundleMessage("LOG_MESSAGE", new String(baos.toByteArray()))); throw new DavMailException("EXCEPTION_INVALID_MESSAGE_CONTENT", me.getMessage()); } } diff --git a/src/java/davmailmessages.properties b/src/java/davmailmessages.properties index 38a93d4b..d304483c 100644 --- a/src/java/davmailmessages.properties +++ b/src/java/davmailmessages.properties @@ -18,7 +18,7 @@ EXCEPTION_INVALID_HEADER=Invalid header: {0} EXCEPTION_INVALID_ICS_LINE=Invalid ICS line: {0} EXCEPTION_INVALID_KEEPALIVE=Invalid Keep-Alive: {0} EXCEPTION_INVALID_MAIL_PATH=Invalid mail path: {0} -EXCEPTION_INVALID_MESSAGE_CONTENT=Invalid calendar message content: {0} +EXCEPTION_INVALID_MESSAGE_CONTENT=Invalid message content: {0} EXCEPTION_INVALID_MESSAGE_URL=Invalid message URL: {0} EXCEPTION_INVALID_RECIPIENT=Invalid recipient: {0} EXCEPTION_INVALID_REQUEST=Invalid request: {0}