use of com.outjected.email.impl.MailMessageImpl 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);
}
use of com.outjected.email.impl.MailMessageImpl in project simple-email by codylerum.
the class InternetAddressTest method invalidToFullAddresses.
@Test(expected = InvalidAddressException.class)
public void invalidToFullAddresses() {
MailMessage m = new MailMessageImpl(TestMailConfigs.standardConfig());
m.to("foo @bar.com", "Woo");
}
use of com.outjected.email.impl.MailMessageImpl in project simple-email by codylerum.
the class InternetAddressTest method invalidCcSimpleAddresses.
@Test(expected = InvalidAddressException.class)
public void invalidCcSimpleAddresses() {
MailMessage m = new MailMessageImpl(TestMailConfigs.standardConfig());
m.cc("woo foo @bar.com");
}
use of com.outjected.email.impl.MailMessageImpl in project simple-email by codylerum.
the class InternetAddressTest method invalidFromFullAddresses.
@Test(expected = InvalidAddressException.class)
public void invalidFromFullAddresses() {
MailMessage m = new MailMessageImpl(TestMailConfigs.standardConfig());
m.from("Woo");
}
use of com.outjected.email.impl.MailMessageImpl in project simple-email by codylerum.
the class InternetAddressTest method invalidCcFullAddresses.
@Test(expected = InvalidAddressException.class)
public void invalidCcFullAddresses() {
MailMessage m = new MailMessageImpl(TestMailConfigs.standardConfig());
m.cc("foo @bar.com", "Woo");
}
Aggregations