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 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()
Returns the current Date in a format suitable for a SMTP date
header.
|
| abstract void | send()
This method should send the email
|
| void | setBccList(Vector list)
Sets the bcc addresses
|
| void | setCcList(Vector list)
Sets the cc addresses
|
| void | setFiles(Vector files)
Sets the files to attach
|
| void | setFrom(EmailAddress from)
Sets the address to send from
|
| void | setHost(String host)
Sets the mail server
|
| void | setIncludeFileNames(boolean b)
Indicates whether filenames should be listed in the body
|
| void | setMessage(Message m)
Sets the message
|
| void | setPassword(String password)
Sets the password for smtp auth
|
| void | setPort(int port)
Sets the smtp port
|
| void | setReplyToList(Vector list)
Sets the replyto addresses
|
| void | setSSL(boolean SSL)
Sets whether the user wants to send the mail through SSL
|
| void | setSubject(String subject)
Sets the subject
|
| void | setTask(Task task)
Sets the owning task
|
| void | setToList(Vector list)
Set the to addresses
|
| void | setUser(String user)
Sets 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: 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