You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mimemail.html 4.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Language" content="en-us">
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>MimeMail Task</title>
  20. </head>
  21. <body>
  22. <h2><a name="mimemail">MimeMail</a></h2>
  23. <h3><i>Deprecated</i></h3>
  24. <p><i>This task has been deprecated. Use the <a href="../Tasks/mail.html">mail</a> task instead.</i></p>
  25. <h3>Description</h3>
  26. <p>Sends SMTP mail with MIME attachments.
  27. <a href="https://javaee.github.io/javamail/">JavaMail</a>
  28. and <a href="https://github.com/javaee/activation">Java
  29. Activation Framework</a> are required for this task. The Java
  30. Activation Framework is part of the standard class library for Java 6
  31. to Java 10 but the <code>java.activation</code> module has been
  32. deprecated in Java 9 and must be enabled explicitly when running on
  33. Java 10. Alternatively it can be provided as an external library.</p>
  34. <p>Multiple files can be attached using <a href="../Types/fileset.html">FileSets.</a></p>
  35. <h3>Parameters</h3>
  36. <table border="1" cellpadding="2" cellspacing="0">
  37. <tr>
  38. <td valign="top"><b>Attribute</b></td>
  39. <td valign="top"><b>Description</b></td>
  40. <td align="center" valign="top"><b>Required</b></td>
  41. </tr>
  42. <tr>
  43. <td valign="top">message</td>
  44. <td valign="top">The message body</td>
  45. <td valign="top" align="center" rowspan="2">No, but only one of of 'message' or
  46. 'messageFile' may be specified.&nbsp; If not specified, a fileset must be
  47. provided.</td>
  48. </tr>
  49. <tr>
  50. <td valign="top">messageFile</td>
  51. <td valign="top">A filename to read and used as the message body</td>
  52. </tr>
  53. <tr>
  54. <td valign="top">messageMimeType</td>
  55. <td valign="top">MIME type to use for 'message' or 'messageFile' when
  56. attached.</td>
  57. <td align="center" valign="top">No, defaults to "text/plain"</td>
  58. </tr>
  59. <tr>
  60. <td valign="top">tolist</td>
  61. <td valign="top">Comma-separated list of To: recipients</td>
  62. <td valign="top" align="center" rowspan="3">Yes, at least one of 'tolist', 'cclist',
  63. or 'bcclist' must be specified.</td>
  64. </tr>
  65. <tr>
  66. <td valign="top">cclist</td>
  67. <td valign="top">Comma-separated list of CC: recipients</td>
  68. <td valign="top" align="center">&nbsp;</td>
  69. </tr>
  70. <tr>
  71. <td valign="top">bcclist</td>
  72. <td valign="top">Comma-separated list of BCC: recipients</td>
  73. <td valign="top" align="center">&nbsp;</td>
  74. </tr>
  75. <tr>
  76. <td valign="top">mailhost</td>
  77. <td valign="top">Host name of the mail server.</td>
  78. <td valign="top" align="center">No, default to &quot;localhost&quot;</td>
  79. </tr>
  80. <tr>
  81. <td valign="top">subject</td>
  82. <td valign="top">Email subject line.</td>
  83. <td valign="top" align="center">No</td>
  84. </tr>
  85. <tr>
  86. <td valign="top">from</td>
  87. <td valign="top">Email address of sender.</td>
  88. <td valign="top" align="center">Yes</td>
  89. </tr>
  90. <tr>
  91. <td valign="top">failonerror</td>
  92. <td valign="top">Stop the build process if an error occurs sending the
  93. e-mail.</td>
  94. <td valign="top" align="center">No, default to &quot;true&quot;</td>
  95. </tr>
  96. </table>
  97. <h3>Examples</h3>
  98. <p><b>Send a single HTML file as the body of a message</b></p>
  99. <pre> &lt;mimemail messageMimeType=&quot;text/html&quot; messageFile=&quot;overview-summary.html&quot;
  100. tolist=&quot;you&quot; subject=&quot;JUnit Test Results: ${TODAY}&quot; from=&quot;me&quot;/&gt;</pre>
  101. <p><b>Sends all files in a directory as attachments</b></p>
  102. <pre> &lt;mimemail message=&quot;See attached files&quot; tolist=&quot;you&quot; subject=&quot;Attachments&quot; from=&quot;me&quot;&gt;
  103. &lt;fileset dir=&quot;.&quot;&gt;
  104. &lt;include name=&quot;dist/*.*&quot;/&gt;
  105. &lt;/fileset&gt;
  106. &lt;/mimemail&gt;
  107. </pre>
  108. </body>
  109. </html>