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

TestMailServer.ImapServer improve reply to FETCH ENVELOPE

    XMLWordPrintable

    Details

      Description

      org.springframework.integration.test.mail.TestMailServer.ImapServer currently replies to FETCH ENVELOPE with

      ...
      + "\"Test Email\" ((\"Bar\" NIL \"bar\" \"baz\")) "
      + "((\"Foo\" NIL \"foo\" \"bar.tv\")) "
      + "((\"Foo\" NIL \"foo\" \"bar.tv\")) "
      + "((\"Foo\" NIL \"foo\" \"bar\")) NIL NIL "
      ...
      

      According to RFC2822, this corresponds to:
      from: Bar <[email protected]>
      sender: Foo <[email protected]>
      reply-to: Foo <[email protected]>
      to: Foo <[email protected]>

      It would make more sense to have the same from, sender and reply-to, like this:

      ...
      + "\"Test Email\" ((\"Bar\" NIL \"bar\" \"baz\")) "
      + "((\"Bar\" NIL \"bar\" \"baz\")) "
      + "((\"Bar\" NIL \"bar\" \"baz\")) "
      + "((\"Foo\" NIL \"foo\" \"bar\")) NIL NIL "
      ...
      

      With the current implementation, the MimeMessage produced by javax.mail contains the "not-so-meaningful" headers described above. The suggested improvement will "correct" these headers.

      Perhaps ImapMailReceiverTests could be enhanced to check for sender and reply-to headers as well.

        Attachments

          Activity

            People

            Assignee:
            grussell Gary Russell
            Reporter:
            antonios.sigalas@nokia.com Frank Sigalas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: