Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Complete
-
4.3.1
Description
A pop3 MimeMessage.getContent() just renders the mail body.
foo
An imap IMAPMessage.getContent() renders some headers:
To: [email protected] From: [email protected] Subject: Test Email foo
Since 2.2, we have wrapped messages in an IntegrationMimeMessage extends MimeMessage; this is done to eagerly fetch the message, but causes an IMAP mail rendering to be just the body (like with POP3).
This is exacerbated by the new 4.3 feature to use a header mapper, which causes getContent() on the original message to be performed on the mime message, rendering the additional information in the payload.
Consider delegating getContent() to the source field to restore the normal IMAP behavior to IMAP messages.
We should also add an option, e.g. imapSimpleRendering, to the mail receiver to allow reverting to the current state - there is some value in providing consistency across POP3 and IMAP - if this flag is set, we should also change the rendering with a header mapper to be consistent with this mode as well.