Class JakartaMimeMailer
java.lang.Object
org.apache.tools.ant.taskdefs.email.Mailer
org.apache.tools.ant.taskdefs.email.JakartaMimeMailer
Uses the JakartaMail classes to send Mime format email.
- Since:
- Ant 1.10.13
-
Field Summary
Fields inherited from class Mailer
bccList, ccList, files, from, headers, host, includeFileNames, message, password, port, replyToList, SSL, subject, task, toList, userModifier and TypeFieldDescriptionprotected Vector<EmailAddress> protected Vector<EmailAddress> protected EmailAddressprotected Stringprotected booleanprotected Messageprotected Stringprotected intprotected Vector<EmailAddress> protected booleanprotected Stringprotected Taskprotected Vector<EmailAddress> protected String -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Mailer
getDate, isPortExplicitlySpecified, isStartTLSEnabled, isStartTLSRequired, setBccList, setCcList, setCheckServerIdentity, setEnableStartTLS, setFiles, setFrom, setHeaders, setHost, setIgnoreInvalidRecipients, setIncludeFileNames, setMessage, setPassword, setPort, setPortExplicitlySpecified, setReplyToList, setRequireStartTLS, setSSL, setSubject, setTask, setToList, setUser, shouldCheckServerIdentity, shouldIgnoreInvalidRecipientsModifier and TypeMethodDescriptionprotected final StringgetDate()Return the current Date in a format suitable for a SMTP date header.protected booleanWhether the port has been explicitly specified by the user.protected booleanprotected booleanvoidsetBccList(Vector<EmailAddress> list) Set the bcc addresses.voidsetCcList(Vector<EmailAddress> list) Set the cc addresses.voidsetCheckServerIdentity(boolean b) Whether the server's identity shall be verified during TLS handshake.voidsetEnableStartTLS(boolean b) Set whether to allow authentication to switch to a TLS connection via STARTTLS.voidSet the files to attach.voidsetFrom(EmailAddress from) Set the address to send from.voidsetHeaders(Vector<Header> v) Set the generic headers to add to the email.voidSet the mail server.voidsetIgnoreInvalidRecipients(boolean b) Whether invalid recipients should be ignored (but a warning will be logged) instead of making the task fail.voidsetIncludeFileNames(boolean b) Indicate whether filenames should be listed in the body.voidSet the message.voidsetPassword(String password) Set the password for smtp auth.voidsetPort(int port) Set the smtp port.voidsetPortExplicitlySpecified(boolean explicit) Whether the port has been explicitly specified by the user.voidsetReplyToList(Vector<EmailAddress> list) Set the replyTo addresses.voidsetRequireStartTLS(boolean b) Set whether to enforce authentication to switch to a TLS connection via STARTTLS.voidsetSSL(boolean ssl) Set whether to send the mail through SSL.voidsetSubject(String subject) Set the subject.voidSet the owning task.voidsetToList(Vector<EmailAddress> list) Set the to addresses.voidSet the user for smtp auth.protected booleanprotected booleanWhether invalid recipients should be ignored.
-
Constructor Details
-
JakartaMimeMailer
public JakartaMimeMailer()
-
-
Method Details
-
send
public void send()Send the email.- Specified by:
sendin classMailer- Throws:
BuildException- if the email can't be sent.
-