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 "Tellier Benoit (JIRA)" <se...@james.apache.org> on 2018/04/16 05:03:00 UTC
[jira] [Created] (JAMES-2375) DSNBounce mailet do not provide a
subject
Tellier Benoit created JAMES-2375:
-------------------------------------
Summary: 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: Tellier Benoit
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
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org