use of com.outjected.email.api.EmailContact in project simple-email by codylerum.
the class InternetAddressTest method validAddresses.
@Test
public void validAddresses() {
MailMessage m = new MailMessageImpl(TestMailConfigs.standardConfig());
BasicEmailContact seam = new BasicEmailContact("seam@domain.test");
BasicEmailContact seamey = new BasicEmailContact("seamey@domain.test");
Collection<EmailContact> addresses = new ArrayList<EmailContact>();
addresses.add(seamey);
m.from("Seam Seamerson<seam@domain.test>");
m.from("seam@domain.test");
m.from(seam);
m.to("seam@domain.test", "Seam Seamerson<seam@domain.test>");
m.to("Seam Seamerson<seam@domain.test>");
m.to("seam@domain.test");
m.to(seam);
m.to(addresses);
m.cc("seam@domain.test", "Seam Seamerson<seam@domain.test>");
m.cc("Seam Seamerson<seam@domain.test>");
m.cc("seam@domain.test");
m.cc(seam);
m.cc(addresses);
m.bcc("seam@domain.test", "Seam Seamerson<seam@domain.test>");
m.bcc("Seam Seamerson<seam@domain.test>");
m.bcc("seam@domain.test");
m.bcc(seam);
m.bcc(addresses);
m.replyTo("Seam Seamerson<seam@domain.test>");
m.replyTo("seam@domain.test");
m.replyTo(seam);
}
Aggregations