## MimeMail

### Deprecated

This task has been deprecated. Use the mail task instead.

### Description

Sends SMTP mail with MIME attachments. JavaMail and Java Activation Framework are required for this task. The Java Activation Framework is part of the standard class library for Java 6 to Java 10 but the `java.activation` module has been deprecated in Java 9 and must be enabled explicitly when running on Java 10. Alternatively it can be provided as an external library.

Multiple files can be attached using FileSets.

### Parameters

Attribute | Description | Required
--- | --- | ---
message | The message body | Exactly one of these, or a nested fileset
messageFile | A filename to read and used as the message body
messageMimeType | MIME type to use for message or messageFile when attached. | No; defaults to text/plain
tolist | Comma-separated list of `To:` recipients | Yes, at least one of these
cclist | Comma-separated list of `CC:` recipients
bcclist | Comma-separated list of `BCC:` recipients
mailhost | Host name of the mail server. | No; default to localhost
subject | Email subject line. | No
from | Email address of sender. | Yes
failonerror | Stop the build process if an error occurs sending the e-mail. | No; default to true

### Examples

Send a single HTML file as the body of a message

    <mimemail messageMimeType="text/html" messageFile="overview-summary.html"
              tolist="you" subject="JUnit Test Results: ${TODAY}" from="me"/>

Send all files in a directory as attachments

    <mimemail message="See attached files" tolist="you" subject="Attachments" from="me">
        <fileset dir=".">
           <include name="dist/*.*"/>
        </fileset>
    </mimemail>