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 3.9 KiB

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