Method Summary |
|
public Email | addBcc(String email) Add a blind BCC recipient to the email.
Parameters: email - A String. |
public Email | addBcc(String email, String name) Add a blind BCC recipient to the email.
Parameters: email - A String. Parameters: name - A String. |
public Email | addCc(String email) Add a recipient CC to the email.
Parameters: email - A String. |
public Email | addCc(String email, String name) Add a recipient CC to the email.
Parameters: email - A String. Parameters: name - A String. throws: EmailException - Indicates an invalid email address. |
public void | addHeader(String name, String value) Adds a header ( name, value ) to the headers Map. |
public Email | addReplyTo(String email) Add a reply to address to the email.
Parameters: email - A String. |
public Email | addReplyTo(String email, String name) Add a reply to address to the email.
Parameters: email - A String. Parameters: name - A String. |
public Email | addTo(String email) Add a recipient TO to the email.
Parameters: email - A String. throws: EmailException - Indicates an invalid email address. |
public Email | addTo(String email, String name) Add a recipient TO to the email.
Parameters: email - A String. Parameters: name - A String. throws: EmailException - Indicates an invalid email address. |
public void | buildMimeMessage() Build the internal MimeMessage to be sent. |
public InternetAddress | getFromAddress() Gets the sender of the email. |
public String | getHostName() |
public Session | getMailSession() |
public MimeMessage | getMimeMessage() Returns the internal MimeMessage. |
public Date | getSentDate() Gets the sent date for the email. |
public String | getSmtpPort() Gets the listening port of the SMTP server. |
public String | getSubject() Gets the subject of the email. |
public String | send() Sends the email. |
public String | sendMimeMessage() Sends the previously created MimeMessage to the SMTP server. |
public void | setAuthentication(String userName, String password) Sets the userName and password if authentication is needed. |
public void | setAuthenticator(Authenticator newAuthenticator) Sets the Authenticator to be used when authentication
is requested from the mail server.
This method should be used when your outgoing mail server requires
authentication. |
public Email | setBcc(Collection aCollection) |
public Email | setBounceAddress(String email) Set the "bounce address" - the address to which undeliverable messages
will be returned. |
public Email | setCc(Collection aCollection) Set a list of "CC" addresses.
Parameters: aCollection - collection of InternetAddress objects. |
public void | setCharset(String newCharset) Set the charset of the message. |
public void | setContent(MimeMultipart aMimeMultipart) |
public void | setContent(Object aObject, String aContentType) |
public void | setDebug(boolean d) Setting to true will enable the display of debug information. |
public Email | setFrom(String email) Set the FROM field of the email.
Parameters: email - A String. |
public Email | setFrom(String email, String name) Set the FROM field of the email.
Parameters: email - A String. Parameters: name - A String. throws: EmailException - Indicates an invalid email address. |
public void | setHeaders(Map map) Used to specify the mail headers. |
public void | setHostName(String aHostName) |
public void | setMailSession(Session aSession) |
abstract public Email | setMsg(String msg) Define the content of the mail. |
public void | setPopBeforeSmtp(boolean newPopBeforeSmtp, String newPopHost, String newPopUsername, String newPopPassword) Set details regarding "pop3 before smtp" authentication. |
public void | setSentDate(Date date) Sets the sent date for the email. |
public void | setSmtpPort(int aPortNumber) Set the port number of the outgoing mail server. |
public Email | setSubject(String aSubject) Set the email subject.
Parameters: aSubject - A String. |
public Email | setTo(Collection aCollection) Set a list of "TO" addresses.
Parameters: aCollection - collection of InternetAddress objects. throws: EmailException - Indicates an invalid email address. |
protected InternetAddress[] | toInternetAddressArray(List list) Utility to copy List of known InternetAddress objects into an
array.
Parameters: list - A List. |