org.apache.tools.ant.taskdefs.email
public abstract class Mailer extends Object
Since: Ant 1.5
| Field Summary | |
|---|---|
| protected Vector | bccList |
| protected Vector | ccList |
| protected Vector | files |
| protected EmailAddress | from |
| protected Vector | headers |
| protected String | host |
| protected boolean | includeFileNames |
| protected Message | message |
| protected String | password |
| protected int | port |
| protected Vector | replyToList |
| protected String | subject |
| protected boolean | SSL |
| protected Task | task |
| protected Vector | toList |
| protected String | user |
| Method Summary | |
|---|---|
| protected String | getDate()
Return the current Date in a format suitable for a SMTP date
header.
|
| abstract void | send()
Send the email.
|
| void | setBccList(Vector list)
Set the bcc addresses.
|
| void | setCcList(Vector list)
Set the cc addresses.
|
| void | setFiles(Vector files)
Set the files to attach.
|
| void | setFrom(EmailAddress from)
Set the address to send from.
|
| void | setHeaders(Vector v)
Set the generic headers to add to the email. |
| void | setHost(String host)
Set the mail server.
|
| void | setIncludeFileNames(boolean b)
Indicate whether filenames should be listed in the body.
|
| void | setMessage(Message m)
Set the message.
|
| void | setPassword(String password)
Set the password for smtp auth.
|
| void | setPort(int port)
Set the smtp port.
|
| void | setReplyToList(Vector list)
Set the replyto addresses.
|
| void | setSSL(boolean ssl)
Set whether to send the mail through SSL.
|
| void | setSubject(String subject)
Set the subject.
|
| void | setTask(Task task)
Set the owning task.
|
| void | setToList(Vector list)
Set the to addresses.
|
| void | setUser(String user)
Set the user for smtp auth.
|
Returns: the current date in SMTP suitable format.
Since: Ant 1.5
Throws: BuildException if the email can't be sent.
Parameters: list a vector of the bcc addresses.
Parameters: list a vector of cc addresses.
Parameters: files list of files to attach to the email.
Parameters: from the sender.
Parameters: v a Vector presumed to contain Header objects.
Since: Ant 1.7
Parameters: host the mail server name.
Parameters: b if true list attached file names in the body content.
Parameters: m the message content.
Parameters: password the authentication password.
Since: Ant 1.6
Parameters: port the SMTP port.
Parameters: list a vector of reployTo addresses.
Since: Ant 1.6
Parameters: ssl if true use SSL transport.
Since: Ant 1.6
Parameters: subject the subject line.
Parameters: task the owning task instance.
Parameters: list a vector of recipient addresses.
Parameters: user the username.
Since: Ant 1.6