public class Mailer extends Object
| Constructor and Description |
|---|
Mailer(String smtp)
Construct a new Mailer instance to send mail over the given SMTP host.
|
Mailer(String smtp,
Collection<String> bccs)
Construct a new Mailer instance to send mail over the given SMTP host and including the given bccs (if any) in all emails sent.
|
public Mailer(String smtp)
smtp - a valid SMTP hostIllegalArgumentException - if smtp is blankpublic Mailer(String smtp, Collection<String> bccs)
smtp - a valid SMTP hostbccs - a collection of bcc email addresses that can be parsed to InternetAddress objects, the collection may be null or empty.IllegalArgumentException - if smtp is blankIllegalArgumentException - if one of the included bcc addresses cannot be parsed as InternetAddresspublic boolean send(Mail mail)
Copyright © 2015. All rights reserved.