org.apache.tools.ant.taskdefs.email
Class Mailer
java.lang.Object
org.apache.tools.ant.taskdefs.email.Mailer
public abstract class Mailer
extends java.lang.Object
Base class for the various emailing implementations.
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.
|
bccList
protected Vector bccList
ccList
protected Vector ccList
files
protected Vector files
headers
protected Vector headers
host
protected String host
includeFileNames
protected boolean includeFileNames
password
protected String password
replyToList
protected Vector replyToList
subject
protected String subject
toList
protected Vector toList
user
protected String user
getDate
protected final String getDate()
Return the current Date in a format suitable for a SMTP date
header.
- the current date in SMTP suitable format.
setBccList
public void setBccList(Vector list)
Set the bcc addresses.
list
- a vector of the bcc addresses.
setCcList
public void setCcList(Vector list)
Set the cc addresses.
list
- a vector of cc addresses.
setFiles
public void setFiles(Vector files)
Set the files to attach.
files
- list of files to attach to the email.
setFrom
public void setFrom(EmailAddress from)
Set the address to send from.
setHeaders
public void setHeaders(Vector v)
Set the generic headers to add to the email.
v
- a Vector presumed to contain Header objects.
setHost
public void setHost(String host)
Set the mail server.
host
- the mail server name.
setIncludeFileNames
public void setIncludeFileNames(boolean b)
Indicate whether filenames should be listed in the body.
b
- if true list attached file names in the body content.
setMessage
public void setMessage(Message m)
Set the message.
setPassword
public void setPassword(String password)
Set the password for smtp auth.
password
- the authentication password.
setPort
public void setPort(int port)
Set the smtp port.
setReplyToList
public void setReplyToList(Vector list)
Set the replyto addresses.
list
- a vector of reployTo addresses.
setSSL
public void setSSL(boolean ssl)
Set whether to send the mail through SSL.
ssl
- if true use SSL transport.
setSubject
public void setSubject(String subject)
Set the subject.
subject
- the subject line.
setTask
public void setTask(Task task)
Set the owning task.
task
- the owning task instance.
setToList
public void setToList(Vector list)
Set the to addresses.
list
- a vector of recipient addresses.
setUser
public void setUser(String user)
Set the user for smtp auth.