|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.taskdefs.email.Mailer
Base class for the various emailing implementations.
Field Summary | |
protected java.util.Vector |
bccList
|
protected java.util.Vector |
ccList
|
protected java.util.Vector |
files
|
protected EmailAddress |
from
|
protected java.lang.String |
host
|
protected boolean |
includeFileNames
|
protected Message |
message
|
protected java.lang.String |
password
|
protected int |
port
|
protected java.util.Vector |
replyToList
|
protected boolean |
SSL
|
protected java.lang.String |
subject
|
protected Task |
task
|
protected java.util.Vector |
toList
|
protected java.lang.String |
user
|
Constructor Summary | |
Mailer()
|
Method Summary | |
protected java.lang.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(java.util.Vector list)
Sets the bcc addresses |
void |
setCcList(java.util.Vector list)
Sets the cc addresses |
void |
setFiles(java.util.Vector files)
Sets the files to attach |
void |
setFrom(EmailAddress from)
Sets the address to send from |
void |
setHost(java.lang.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(java.lang.String password)
Sets the password for smtp auth |
void |
setPort(int port)
Sets the smtp port |
void |
setReplyToList(java.util.Vector list)
Sets the replyto addresses |
void |
setSSL(boolean SSL)
Sets whether the user wants to send the mail through SSL |
void |
setSubject(java.lang.String subject)
Sets the subject |
void |
setTask(Task task)
Sets the owning task |
void |
setToList(java.util.Vector list)
Set the to addresses |
void |
setUser(java.lang.String user)
Sets the user for smtp auth |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String host
protected int port
protected java.lang.String user
protected java.lang.String password
protected boolean SSL
protected Message message
protected EmailAddress from
protected java.util.Vector replyToList
protected java.util.Vector toList
protected java.util.Vector ccList
protected java.util.Vector bccList
protected java.util.Vector files
protected java.lang.String subject
protected Task task
protected boolean includeFileNames
Constructor Detail |
public Mailer()
Method Detail |
public void setHost(java.lang.String host)
host
- the mail server namepublic void setPort(int port)
port
- the SMTP portpublic void setUser(java.lang.String user)
user
- the usernamepublic void setPassword(java.lang.String password)
password
- the authentication passwordpublic void setSSL(boolean SSL)
SSL
- if true use SSL transportpublic void setMessage(Message m)
m
- the message contentpublic void setFrom(EmailAddress from)
from
- the senderpublic void setReplyToList(java.util.Vector list)
list
- a vector of reployTo addressespublic void setToList(java.util.Vector list)
list
- a vector of recipient addressespublic void setCcList(java.util.Vector list)
list
- a vector of cc addressespublic void setBccList(java.util.Vector list)
list
- a vector of the bcc addressespublic void setFiles(java.util.Vector files)
files
- list of files to attach to the email.public void setSubject(java.lang.String subject)
subject
- the subject linepublic void setTask(Task task)
task
- the owning task instancepublic void setIncludeFileNames(boolean b)
b
- if true list attached file names in the body content.public abstract void send() throws BuildException
BuildException
- if the email can't be sent.protected final java.lang.String getDate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |