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.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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="../CoreTasks/mail.html">mail</a> task instead.</i></p>
  25. <h3>Description</h3>
  26. <p>Sends SMTP mail with MIME attachments.
  27. <a href="http://java.sun.com/products/javamail/index.html">JavaMail</a>
  28. and <a href="http://java.sun.com/products/javabeans/glasgow/jaf.html">Java
  29. Activation Framework</a> are required for this task.</p>
  30. <p>Multiple files can be attached using <a href="../CoreTypes/fileset.html">FileSets.</a></p>
  31. <h3>Parameters</h3>
  32. <table border="1" cellpadding="2" cellspacing="0">
  33. <tr>
  34. <td valign="top"><b>Attribute</b></td>
  35. <td valign="top"><b>Description</b></td>
  36. <td align="center" valign="top"><b>Required</b></td>
  37. </tr>
  38. <tr>
  39. <td valign="top">message</td>
  40. <td valign="top">The message body</td>
  41. <td valign="top" align="center" rowspan="2">No, but only one of of 'message' or
  42. 'messageFile' may be specified.&nbsp; If not specified, a fileset must be
  43. provided.</td>
  44. </tr>
  45. <tr>
  46. <td valign="top">messageFile</td>
  47. <td valign="top">A filename to read and used as the message body</td>
  48. </tr>
  49. <tr>
  50. <td valign="top">messageMimeType</td>
  51. <td valign="top">MIME type to use for 'message' or 'messageFile' when
  52. attached.</td>
  53. <td align="center" valign="top">No, defaults to "text/plain"</td>
  54. </tr>
  55. <tr>
  56. <td valign="top">tolist</td>
  57. <td valign="top">Comma-separated list of To: recipients</td>
  58. <td valign="top" align="center" rowspan="3">Yes, at least one of 'tolist', 'cclist',
  59. or 'bcclist' must be specified.</td>
  60. </tr>
  61. <tr>
  62. <td valign="top">cclist</td>
  63. <td valign="top">Comma-separated list of CC: recipients</td>
  64. <td valign="top" align="center">&nbsp;</td>
  65. </tr>
  66. <tr>
  67. <td valign="top">bcclist</td>
  68. <td valign="top">Comma-separated list of BCC: recipients</td>
  69. <td valign="top" align="center">&nbsp;</td>
  70. </tr>
  71. <tr>
  72. <td valign="top">mailhost</td>
  73. <td valign="top">Host name of the mail server.</td>
  74. <td valign="top" align="center">No, default to &quot;localhost&quot;</td>
  75. </tr>
  76. <tr>
  77. <td valign="top">subject</td>
  78. <td valign="top">Email subject line.</td>
  79. <td valign="top" align="center">No</td>
  80. </tr>
  81. <tr>
  82. <td valign="top">from</td>
  83. <td valign="top">Email address of sender.</td>
  84. <td valign="top" align="center">Yes</td>
  85. </tr>
  86. <tr>
  87. <td valign="top">failonerror</td>
  88. <td valign="top">Stop the build process if an error occurs sending the
  89. e-mail.</td>
  90. <td valign="top" align="center">No, default to &quot;true&quot;</td>
  91. </tr>
  92. </table>
  93. <h3>Examples</h3>
  94. <p><b>Send a single HTML file as the body of a message</b></p>
  95. <pre> &lt;mimemail messageMimeType=&quot;text/html&quot; messageFile=&quot;overview-summary.html&quot;
  96. tolist=&quot;you&quot; subject=&quot;JUnit Test Results: ${TODAY}&quot; from=&quot;me&quot;/&gt;</pre>
  97. <p><b>Sends all files in a directory as attachments</b></p>
  98. <pre> &lt;mimemail message=&quot;See attached files&quot; tolist=&quot;you&quot; subject=&quot;Attachments&quot; from=&quot;me&quot;&gt;
  99. &lt;fileset dir=&quot;.&quot;&gt;
  100. &lt;include name=&quot;dist/*.*&quot;/&gt;
  101. &lt;/fileset&gt;
  102. &lt;/mimemail&gt;
  103. </pre>
  104. </body>
  105. </html>