MimeMailer (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.email, class: MimeMailer

# Class MimeMailer

java.lang.Object
org.apache.tools.ant.taskdefs.email.Mailer
org.apache.tools.ant.taskdefs.email.MimeMailer

@Deprecated public class MimeMailer extends Mailer
Deprecated.
see org.apache.tools.ant.taskdefs.email.JakartaMimeMailer
Uses the JavaMail classes to send Mime format email.

Since:
  Ant 1.5

- ## Field Summary

  ### Fields inherited from class Mailer

  `bccList, ccList, files, from, headers, host, includeFileNames, message, password, port, replyToList, SSL, subject, task, toList, user`
  Modifier and Type
  Field
  Description
  `protected Vector<EmailAddress>`
  `bccList`
  `protected Vector<EmailAddress>`
  `ccList`
  `protected Vector<File>`
  `files`
  `protected EmailAddress`
  `from`
  `protected Vector<Header>`
  `headers`
  `protected String`
  `host`
  `protected boolean`
  `includeFileNames`
  `protected Message`
  `message`
  `protected String`
  `password`
  `protected int`
  `port`
  `protected Vector<EmailAddress>`
  `replyToList`
  `protected boolean`
  `SSL`
  `protected String`
  `subject`
  `protected Task`
  `task`
  `protected Vector<EmailAddress>`
  `toList`
  `protected String`
  `user`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MimeMailer()`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `send()`
  Deprecated.
  Send the email.

  ### 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, shouldIgnoreInvalidRecipients`
  Modifier and Type
  Method
  Description
  `protected final String`
  `getDate()`
  Return the current Date in a format suitable for a SMTP date header.
  `protected boolean`
  `isPortExplicitlySpecified()`
  Whether the port has been explicitly specified by the user.
  `protected boolean`
  `isStartTLSEnabled()`
  `protected boolean`
  `isStartTLSRequired()`
  `void`
  `setBccList(Vector<EmailAddress> list)`
  Set the bcc addresses.
  `void`
  `setCcList(Vector<EmailAddress> list)`
  Set the cc addresses.
  `void`
  `setCheckServerIdentity(boolean b)`
  Whether the server's identity shall be verified during TLS handshake.
  `void`
  `setEnableStartTLS(boolean b)`
  Set whether to allow authentication to switch to a TLS connection via STARTTLS.
  `void`
  `setFiles(Vector<File> files)`
  Set the files to attach.
  `void`
  `setFrom(EmailAddress from)`
  Set the address to send from.
  `void`
  `setHeaders(Vector<Header> v)`
  Set the generic headers to add to the email.
  `void`
  `setHost(String host)`
  Set the mail server.
  `void`
  `setIgnoreInvalidRecipients(boolean b)`
  Whether invalid recipients should be ignored (but a warning will be logged) instead of making the task fail.
  `void`
  `setIncludeFileNames(boolean b)`
  Indicate whether filenames should be listed in the body.
  `void`
  `setMessage(Message m)`
  Set the message.
  `void`
  `setPassword(String password)`
  Set the password for smtp auth.
  `void`
  `setPort(int port)`
  Set the smtp port.
  `void`
  `setPortExplicitlySpecified(boolean explicit)`
  Whether the port has been explicitly specified by the user.
  `void`
  `setReplyToList(Vector<EmailAddress> list)`
  Set the replyTo addresses.
  `void`
  `setRequireStartTLS(boolean b)`
  Set whether to enforce authentication to switch to a TLS connection via STARTTLS.
  `void`
  `setSSL(boolean ssl)`
  Set whether to send the mail through SSL.
  `void`
  `setSubject(String subject)`
  Set the subject.
  `void`
  `setTask(Task task)`
  Set the owning task.
  `void`
  `setToList(Vector<EmailAddress> list)`
  Set the to addresses.
  `void`
  `setUser(String user)`
  Set the user for smtp auth.
  `protected boolean`
  `shouldCheckServerIdentity()`
  `protected boolean`
  `shouldIgnoreInvalidRecipients()`
  Whether invalid recipients should be ignored.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MimeMailer

    public MimeMailer()
    Deprecated.

- ## Method Details

  - ### send

    public void send()
    Deprecated.
    Send the email.
    Specified by:
      `send` in class `Mailer`
    Throws:
      `BuildException` - if the email can't be sent.