|
|||||||||
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
public abstract class 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.util.Vector |
headers
|
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()
Return the current Date in a format suitable for a SMTP date header. |
abstract void |
send()
Send the email. |
void |
setBccList(java.util.Vector list)
Set the bcc addresses. |
void |
setCcList(java.util.Vector list)
Set the cc addresses. |
void |
setFiles(java.util.Vector files)
Set the files to attach. |
void |
setFrom(EmailAddress from)
Set the address to send from. |
void |
setHeaders(java.util.Vector v)
Set the generic headers to add to the email. |
void |
setHost(java.lang.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(java.lang.String password)
Set the password for smtp auth. |
void |
setPort(int port)
Set the smtp port. |
void |
setReplyToList(java.util.Vector list)
Set the replyto addresses. |
void |
setSSL(boolean ssl)
Set whether to send the mail through SSL. |
void |
setSubject(java.lang.String subject)
Set the subject. |
void |
setTask(Task task)
Set the owning task. |
void |
setToList(java.util.Vector list)
Set the to addresses. |
void |
setUser(java.lang.String user)
Set 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
protected java.util.Vector headers
Constructor Detail |
---|
public Mailer()
Method Detail |
---|
public void setHost(java.lang.String host)
host
- the mail server name.public void setPort(int port)
port
- the SMTP port.public void setUser(java.lang.String user)
user
- the username.public void setPassword(java.lang.String password)
password
- the authentication password.public void setSSL(boolean ssl)
ssl
- if true use SSL transport.public void setMessage(Message m)
m
- the message content.public void setFrom(EmailAddress from)
from
- the sender.public void setReplyToList(java.util.Vector list)
list
- a vector of reployTo addresses.public void setToList(java.util.Vector list)
list
- a vector of recipient addresses.public void setCcList(java.util.Vector list)
list
- a vector of cc addresses.public void setBccList(java.util.Vector list)
list
- a vector of the bcc addresses.public 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 line.public void setTask(Task task)
task
- the owning task instance.public void setIncludeFileNames(boolean b)
b
- if true list attached file names in the body content.public void setHeaders(java.util.Vector v)
v
- a Vector presumed to contain Header objects.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 |