2018-12-21 11:20:43 +01:00
|
|
|
<!DOCTYPE html>
|
2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
2019-05-25 13:41:47 +02:00
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
2006-09-11 04:19:00 +00:00
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2018-12-21 11:20:43 +01:00
|
|
|
<html lang="en">
|
2001-07-11 16:11:47 +00:00
|
|
|
|
|
|
|
<head>
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2002-02-03 22:11:39 +00:00
|
|
|
<title>MimeMail Task</title>
|
2001-07-11 16:11:47 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="mimemail">MimeMail</h2>
|
2002-02-05 09:32:48 +00:00
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<h3><em><u>Deprecated</u></em></h3>
|
|
|
|
<p><em>This task has been <u>deprecated</u>. Use the <a href="../Tasks/mail.html">mail</a> task instead.</em></p>
|
2002-02-05 09:32:48 +00:00
|
|
|
|
2001-07-11 16:11:47 +00:00
|
|
|
<h3>Description</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Sends SMTP mail with MIME
|
2018-07-03 18:31:57 +02:00
|
|
|
attachments. <a href="https://javaee.github.io/javamail/"
|
2018-03-08 07:43:53 +01:00
|
|
|
target="_top">JavaMail</a>
|
2018-07-03 18:31:57 +02:00
|
|
|
and <a href="https://github.com/javaee/activation" target="_top">Java
|
2018-07-03 18:28:55 +02:00
|
|
|
Activation Framework</a> are required for this task. The Java
|
2018-07-04 06:27:37 +02:00
|
|
|
Activation Framework is part of the standard class library for Java 6
|
|
|
|
to Java 10 but the <code>java.activation</code> 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.</p>
|
2010-05-26 20:33:51 +00:00
|
|
|
<p>Multiple files can be attached using <a href="../Types/fileset.html">FileSets.</a></p>
|
2001-07-11 16:11:47 +00:00
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2001-07-11 16:11:47 +00:00
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col">Attribute</th>
|
|
|
|
<th scope="col">Description</th>
|
|
|
|
<th scope="col">Required</th>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>message</td>
|
|
|
|
<td>The message body</td>
|
|
|
|
<td rowspan="2">Exactly one of these, or a nested fileset</td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>messageFile</td>
|
|
|
|
<td class="left">A filename to read and used as the message body</td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>messageMimeType</td>
|
|
|
|
<td>MIME type to use for <var>message</var> or <var>messageFile</var> when attached.</td>
|
|
|
|
<td>No; defaults to <q>text/plain</q></td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>tolist</td>
|
|
|
|
<td>Comma-separated list of <code>To:</code> recipients</td>
|
|
|
|
<td rowspan="3">Yes, at least one of these</td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>cclist</td>
|
|
|
|
<td class="left">Comma-separated list of <code>CC:</code> recipients</td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>bcclist</td>
|
|
|
|
<td class="left">Comma-separated list of <code>BCC:</code> recipients</td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>mailhost</td>
|
|
|
|
<td>Host name of the mail server.</td>
|
|
|
|
<td>No; default to <q>localhost</q></td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>subject</td>
|
|
|
|
<td>Email subject line.</td>
|
|
|
|
<td>No</td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>from</td>
|
|
|
|
<td>Email address of sender.</td>
|
|
|
|
<td>Yes</td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>failonerror</td>
|
|
|
|
<td>Stop the build process if an error occurs sending the e-mail.</td>
|
|
|
|
<td>No; default to <q>true</q></td>
|
2001-07-11 16:11:47 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<h3>Examples</h3>
|
2018-05-15 09:51:58 +02:00
|
|
|
<p>Send a single HTML file as the body of a message</p>
|
2018-02-28 07:58:59 +01:00
|
|
|
<pre>
|
|
|
|
<mimemail messageMimeType="text/html" messageFile="overview-summary.html"
|
|
|
|
tolist="you" subject="JUnit Test Results: ${TODAY}" from="me"/></pre>
|
2018-05-15 09:51:58 +02:00
|
|
|
|
|
|
|
<p>Send all files in a directory as attachments</p>
|
2018-02-28 07:58:59 +01:00
|
|
|
<pre>
|
|
|
|
<mimemail message="See attached files" tolist="you" subject="Attachments" from="me">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="dist/*.*"/>
|
|
|
|
</fileset>
|
|
|
|
</mimemail></pre>
|
2006-09-11 20:22:51 +00:00
|
|
|
|
2001-07-11 16:11:47 +00:00
|
|
|
</body>
|
|
|
|
</html>
|