Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2375

DSNBounce mailet do not provide a subject

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Mailet Contributions
    • Labels:

      Description

      As reported by Craig Cudmor,

      DSNBounce never position a subject on sent emails, independently from the "prefix" configuration option.

          @Test
          public void test() throws Exception {
              FakeMailetConfig mailetConfig = FakeMailetConfig.builder()
                      .mailetName(MAILET_NAME)
                      .mailetContext(fakeMailContext)
                  .setProperty("prefix", "Re:")
                      .build();
              dsnBounce.init(mailetConfig);
      
              MailAddress senderMailAddress = new MailAddress("sender@domain.com");
              FakeMail mail = FakeMail.builder()
                      .sender(senderMailAddress)
                      .mimeMessage(MimeMessageBuilder.mimeMessageBuilder()
                          .setSubject("Toto")
                          .setText("My content"))
                      .name(MAILET_NAME)
                      .recipient("recipient@domain.com")
                      .lastUpdated(DateTime.parse("2016-09-08T14:25:52.000Z").toDate())
                      .build();
      
              dsnBounce.service(mail);
      
              List<SentMail> sentMails = fakeMailContext.getSentMails();
              assertThat(sentMails).hasSize(1);
              SentMail sentMail = sentMails.get(0);
              MimeMessage sentMessage = sentMail.getMsg();
              assertThat(sentMessage.getSubject()).isEqualTo("Re: Toto");
          }
      

      will fail.

      We need to use a default 'Re: ' prefix, and ensure a subject is always sent.

      We need to check subjects for the RedirectNotify mailet hierarchy.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                btellier Benoit Tellier
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m