You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2020/06/18 05:10:00 UTC
[jira] [Closed] (JAMES-2375) DSNBounce mailet do not provide a
subject
[ https://issues.apache.org/jira/browse/JAMES-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Tellier closed JAMES-2375.
---------------------------------
Resolution: Fixed
c17b2ad4fef46600601878d5ed7866c674872616 did fix this
> DSNBounce mailet do not provide a subject
> -----------------------------------------
>
> Key: JAMES-2375
> URL: https://issues.apache.org/jira/browse/JAMES-2375
> Project: James Server
> Issue Type: Bug
> Components: Mailet Contributions
> Reporter: Benoit Tellier
> Priority: Major
> Labels: bug, easy-fix
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> As reported by Craig Cudmor,
> DSNBounce never position a subject on sent emails, independently from the "prefix" configuration option.
> {code:java}
> @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");
> }
> {code}
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org