public class Mail extends Object implements Serializable
| Constructor and Description |
|---|
Mail()
Constructs a new empty Mail instance
|
| Modifier and Type | Method and Description |
|---|---|
Mail |
addBcc(javax.mail.internet.InternetAddress bcc) |
Mail |
addBcc(String bcc) |
Mail |
addCc(javax.mail.internet.InternetAddress cc) |
Mail |
addCc(String cc) |
Mail |
from(javax.mail.internet.InternetAddress from) |
Mail |
from(String from) |
Mail |
to(javax.mail.internet.InternetAddress to) |
Mail |
to(String to) |
String |
toString() |
Mail |
withHtml(String html) |
Mail |
withSubject(String subject) |
Mail |
withText(String txt) |
public Mail from(javax.mail.internet.InternetAddress from)
from - a valid, non-null InternetAddressIllegalArgumentException - if argument is nullpublic Mail from(String from)
from - a valid, non-blank String that can be parsed as InternetAddressIllegalArgumentException - if argument is not a legal email addresspublic Mail to(javax.mail.internet.InternetAddress to)
to - a valid, non-null InternetAddressIllegalArgumentException - if argument is nullpublic Mail to(String to)
to - a valid, non-blank String that can be parsed as InternetAddressIllegalArgumentException - if argument is not a legal email addresspublic Mail withSubject(String subject)
subject - a String (no restrictions)public Mail withText(String txt)
txt - a String (no restrictions)public Mail withHtml(String html)
html - a String (no restrictions)public Mail addCc(String cc)
cc - a valid, non-blank String that can be parsed as InternetAddressIllegalArgumentException - if argument is not a legal email addresspublic Mail addCc(javax.mail.internet.InternetAddress cc)
cc - a valid, non-null InternetAddressIllegalArgumentException - if argument is nullpublic Mail addBcc(String bcc)
bcc - a valid, non-blank String that can be parsed as InternetAddressIllegalArgumentException - if argument is not a legal email addresspublic Mail addBcc(javax.mail.internet.InternetAddress bcc)
bcc - a valid, non-null InternetAddressIllegalArgumentException - if argument is nullCopyright © 2015. All rights reserved.