@Test public void serviceShouldHandleMailWithoutRecipient() throws Exception { FakeMail mail = FakeMail.builder().name("mail").build(); testee.service(mail); assertThat(mail.getPerRecipientSpecificHeaders()) .isEqualTo(new PerRecipientHeaders()); }
@Override public void service(Mail mail) throws MessagingException { for (MailAddress recipient: mail.getRecipients()) { mail.addSpecificHeaderForRecipient(PerRecipientHeaders.Header.builder() .name(DELIVERED_TO) .value(recipient.asString()) .build(), recipient); } }
AddDeliveredToHeader extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { for (MailAddress recipient: mail.getRecipients()) { mail.addSpecificHeaderForRecipient(PerRecipientHeaders.Header.builder() .name(DELIVERED_TO) .value(recipient.asString()) .build(), recipient); } } }
AddDeliveredToHeader extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { for (MailAddress recipient: mail.getRecipients()) { mail.addSpecificHeaderForRecipient(PerRecipientHeaders.Header.builder() .name(DELIVERED_TO) .value(recipient.asString()) .build(), recipient); } }  }
AddDeliveredToHeader extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { for (MailAddress recipient: mail.getRecipients()) { mail.addSpecificHeaderForRecipient(PerRecipientHeaders.Header.builder() .name(DELIVERED_TO) .value(recipient.asString()) .build(), recipient); } }  @Override void service(Mail mail); }
AddDeliveredToHeader extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { for (MailAddress recipient: mail.getRecipients()) { mail.addSpecificHeaderForRecipient(PerRecipientHeaders.Header.builder() .name(DELIVERED_TO) .value(recipient.asString()) .build(), recipient); } }  @Override void service(Mail mail); static final String DELIVERED_TO; }