From f5b5a8b53cad568d5a5ab97ed35c91f698fb1c8e Mon Sep 17 00:00:00 2001
From: Matthew Jason Benson
Date: Wed, 2 Feb 2005 20:08:57 +0000
Subject: [PATCH] Add nested header element to the mail task. PR: 24713
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277575 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 2 +
docs/manual/CoreTasks/mail.html | 27 ++-
.../tools/ant/taskdefs/email/EmailTask.java | 207 ++++++++----------
.../tools/ant/taskdefs/email/Header.java | 60 +++++
.../tools/ant/taskdefs/email/Mailer.java | 89 ++++----
.../tools/ant/taskdefs/email/MimeMailer.java | 149 +++++++------
.../tools/ant/taskdefs/email/PlainMailer.java | 18 +-
7 files changed, 306 insertions(+), 246 deletions(-)
create mode 100755 src/main/org/apache/tools/ant/taskdefs/email/Header.java
diff --git a/WHATSNEW b/WHATSNEW
index d30464dfb..a7f77d27a 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -99,6 +99,8 @@ Other changes:
* ant -diagnostics lists contents of ${user.home}/.ant/lib
+* mail task accepts nested header element. Bugzilla report 24713.
+
Changes from Ant 1.6.2 to current Ant 1.6 CVS version
=====================================================
diff --git a/docs/manual/CoreTasks/mail.html b/docs/manual/CoreTasks/mail.html
index 986b33937..e61590b1d 100644
--- a/docs/manual/CoreTasks/mail.html
+++ b/docs/manual/CoreTasks/mail.html
@@ -212,6 +212,31 @@ inside the <message>
element. Property expansion will occur
in the message, whether it is specified as an external file or as text within
the <message>
element.
+header
+Since Ant 1.7, arbitrary mail headers can be added by
+ specifying these attributes on one or more nested header elements:
+
+
+
+ Attribute |
+ Description |
+ Required |
+
+
+ name |
+ The name associated with this mail header. |
+ Yes |
+
+
+ value |
+ The value to assign to this mail header. |
+ Yes |
+
+
+
+It is permissible to duplicate the name attribute amongst multiple headers.
+
+
Examples
@@ -259,7 +284,7 @@ will be replaced with the buildname
property's value.
Test Build, the message body being coded in UTF-8
-Copyright © 2000-2004 The Apache Software Foundation. All rights
+
Copyright © 2000-2005 The Apache Software Foundation. All rights
Reserved.