@Test void fromMime4JMessageShouldParseFoldedHeaders() throws Exception { Message message = toMime4JMessage( "From: bob@domain\r\n" + "To: alice@domain,\r\n" + " cedric@domain\r\n" + "Cc: dave@domain\r\n" + "Bcc: edgard@domain\r\n"); Envelope envelope = Envelope.fromMime4JMessage(message); assertThat(envelope).isEqualTo( new Envelope(MaybeSender.of(new MailAddress("bob@domain")), ImmutableSet.of(new MailAddress("alice@domain"), new MailAddress("cedric@domain"), new MailAddress("dave@domain"), new MailAddress("edgard@domain")))); }
public static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage) { return fromMime4JMessage(mime4JMessage, ValidationPolicy.THROW); }
Envelope { public static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage) { return fromMime4JMessage(mime4JMessage, ValidationPolicy.THROW); } }
Envelope { public static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage) { return fromMime4JMessage(mime4JMessage, ValidationPolicy.THROW); } Envelope(MaybeSender from, Set<MailAddress> recipients); }
Envelope { public static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage) { return fromMime4JMessage(mime4JMessage, ValidationPolicy.THROW); } Envelope(MaybeSender from, Set<MailAddress> recipients); static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage); static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage, ValidationPolicy validationPolicy); MaybeSender getFrom(); Set<MailAddress> getRecipients(); @Override final boolean equals(Object o); @Override final int hashCode(); }
Envelope { public static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage) { return fromMime4JMessage(mime4JMessage, ValidationPolicy.THROW); } Envelope(MaybeSender from, Set<MailAddress> recipients); static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage); static Envelope fromMime4JMessage(org.apache.james.mime4j.dom.Message mime4JMessage, ValidationPolicy validationPolicy); MaybeSender getFrom(); Set<MailAddress> getRecipients(); @Override final boolean equals(Object o); @Override final int hashCode();  }