Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-4098

IMAP Message Rendering Consistency

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.3.1
    • Fix Version/s: 5.0.M1
    • Component/s: Mail Support
    • Labels:

      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.

        Attachments

          Activity

            People

            Assignee:
            grussell Gary Russell
            Reporter:
            grussell Gary Russell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: