org.apache.tools.ant.taskdefs.email
public class EmailTask extends Task
Since: Ant 1.5
UNKNOWN: name="mail" category="network"
Nested Class Summary | |
---|---|
static class | EmailTask.Encoding
Enumerates the encoding constants |
Field Summary | |
---|---|
static String | AUTO Constant to show that the best available mailer should be used. |
static String | MIME Constant to allow the Mime mailer to be requested |
static String | PLAIN Constant to allow the plaintext mailer to be requested |
static String | UU Constant to allow the UU mailer to be requested |
Method Summary | |
---|---|
void | addBcc(EmailAddress address)
Adds "bcc" address elements
|
void | addCc(EmailAddress address)
Adds "cc" address element
|
void | addFileset(FileSet fs)
Adds a set of files (nested fileset attribute).
|
void | addFrom(EmailAddress address)
Adds a from address element
|
void | addMessage(Message message)
Add a message element
|
void | addReplyTo(EmailAddress address)
Adds a replyto address element
|
void | addTo(EmailAddress address)
Adds a to address element
|
void | execute() Sends an email |
String | getCharset()
Returns the character set of mail message.
|
boolean | getIncludeFileNames()
Identifies whether file names should be included
|
void | setBccList(String list)
Adds "bcc" address elements
|
void | setCcList(String list)
Adds "cc" address elements
|
void | setCharset(String charset)
Sets the character set of mail message.
|
void | setEncoding(EmailTask.Encoding encoding)
Allows the build writer to choose the preferred encoding method
|
void | setFailOnError(boolean failOnError)
Indicates whether BuildExceptions should be passed back to the core
|
void | setFiles(String filenames)
Adds a list of files to be attached
|
void | setFrom(String address)
Shorthand to set the from address element
|
void | setIncludefilenames(boolean includeFileNames)
Sets Includefilenames attribute
|
void | setMailhost(String host)
Sets the host
|
void | setMailport(int port)
Sets the mail server port
|
void | setMessage(String message)
Shorthand method to set the message
|
void | setMessageFile(File file)
Shorthand method to set the message from a file
|
void | setMessageMimeType(String type)
Shorthand method to set type of the text message, text/plain by default
but text/html or text/xml is quite feasible.
|
void | setPassword(String password)
sets the password for SMTP auth; this requires JavaMail |
void | setReplyTo(String address)
Shorthand to set the replyto address element
|
void | setSSL(boolean SSL)
tells if the user needs to send his data over SSL |
void | setSubject(String subject)
Sets the subject line of the email
|
void | setToList(String list)
Adds "to" address elements
|
void | setUser(String user)
sets the user for SMTP auth; this requires JavaMail |
Parameters: address The email address
Parameters: address The email address
Parameters: fs The fileset
Parameters: address The address to send from
Parameters: message The message object
Throws: BuildException if a message has already been added
Parameters: address The address to reply to
Since: ant 1.6
Parameters: address An email address
Returns: Charset of mail message.
Since: Ant 1.6
Returns: Identifies whether file names should be included
Parameters: list comma separated list of addresses
Parameters: list Comma separated list of addresses
mime
Since: Ant 1.6
Parameters: encoding The encoding (one of AUTO,MIME,UU,PLAIN)
Parameters: failOnError The new FailOnError value
Parameters: filenames Comma separated list of files
Parameters: address The address to send mail from
Parameters: includeFileNames Whether to include filenames in the text of the message
Parameters: host The host to connect to
Parameters: port The port to use
Parameters: message Message body of this email.
Parameters: file The file from which to take the message
Parameters: type The new MessageMimeType value
Parameters: password
Since: ant 1.6
Parameters: address The address to which replies should be directed
Since: ant 1.6
Parameters: SSL
Since: ant 1.6
Parameters: subject Subject of this email.
Parameters: list Comma separated list of addresses
Parameters: user
Since: ant 1.6