|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.optional.net.MimeMail
A task to send SMTP email. This version has near identical syntax to the SendEmail task, but is MIME aware. It also requires Sun's mail.jar and activation.jar to compile and execute, which puts it clearly into the very optional category.
Field Summary | |
protected java.lang.String |
bccList
BCC (Blind Carbon Copy) recipients |
protected java.lang.String |
ccList
CC (Carbon Copy) recipients |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
MimeMail()
Creates new instance |
Method Summary | |
void |
addFileset(FileSet set)
Adds a set of files (nested fileset attribute). |
void |
doMail()
here is where the mail is sent |
void |
execute()
Executes this build task. throws org.apache.tools.ant.BuildException if there is an error during task execution. |
void |
setBccList(java.lang.String bccList)
Sets the toList parameter of this build task. |
void |
setCcList(java.lang.String ccList)
Sets the toList parameter of this build task. |
void |
setFailOnError(boolean failOnError)
Sets the FailOnError attribute of the MimeMail object |
void |
setFrom(java.lang.String from)
Sets the "from" parameter of this build task. |
void |
setMailhost(java.lang.String mailhost)
Sets the mailhost parameter of this build task. |
void |
setMessage(java.lang.String message)
Sets the message parameter of this build task. |
void |
setMessageFile(java.io.File messageFile)
|
void |
setMessageMimeType(java.lang.String type)
set type of the text message, plaintext by default but text/html or text/xml is quite feasible |
void |
setSubject(java.lang.String subject)
Sets the subject parameter of this build task. |
void |
setToList(java.lang.String toList)
Sets the toList parameter of this build task. |
void |
validate()
verify parameters |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String ccList
protected java.lang.String bccList
Constructor Detail |
public MimeMail()
Method Detail |
public void setFailOnError(boolean failOnError)
failOnError
- The new FailOnError valuepublic void addFileset(FileSet set)
public void setToList(java.lang.String toList)
toList
- Comma-separated list of email recipient addreses.public void setCcList(java.lang.String ccList)
toList
- Comma-separated list of email recipient addreses.public void setBccList(java.lang.String bccList)
toList
- Comma-separated list of email recipient addreses.public void setFrom(java.lang.String from)
from
- Email address of sender.public void setMailhost(java.lang.String mailhost)
mailhost
- Mail host name.public void setMessage(java.lang.String message)
message
- Message body of this email.public void setMessageFile(java.io.File messageFile)
public void setMessageMimeType(java.lang.String type)
type
- The new MessageMimeType valuepublic void setSubject(java.lang.String subject)
subject
- Subject of this email.public void validate()
BuildException
- if something is invalidpublic void execute() throws BuildException
execute
in class Task
BuildException
- Description of Exceptionpublic void doMail() throws javax.mail.MessagingException, javax.mail.internet.AddressException, BuildException
MessagingException
- Description of ExceptionAddressException
- Description of ExceptionBuildException
- Description of Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |