This patch simply removes a + " " that a recent patch started appending to
the prefix string. The " " was appended because the author wanted to place
a space between the prefix and the subject. By default, whitespace is
trimmed from body content of elements in the config.xml file, so simply
putting a trailing space in config.xml didn't work. However, by simply
adding xml:space="preserve", one can change that behavior.
The following mailet provides a trivial example:
<mailet match="RecipientIs=test@domain" class="Redirect">
<recipients>user1@domain, user2@domain</recipients>
<to>list@domain</to>
<sender>owner@domain</sender>
<message>sent on from James</message>
<inline>unaltered</inline>
<replyto>postmaster</replyto>
<prefix xml:space="preserve">[test mailing] </prefix>
<!-- ------- this ------- keeps this ^ -->
<static>TRUE</static>
<passThrough>FALSE</passThrough>
</mailet>
Note the use of the xml:space attribute on the <prefix> tag.
Index: Redirect.java
===================================================================
RCS file:
/home/cvspublic/jakarta-james/src/java/org/apache/james/transport/mailets/Redirect.java,v
retrieving revision 1.5
diff -u -r1.5 Redirect.java
--- Redirect.java 28 Jul 2002 11:46:41 -0000 1.5
+++ Redirect.java 30 Jul 2002 20:07:29 -0000
@@ -359,7 +359,7 @@
if(getInitParameter("prefix") == null) {
return "";
} else {
- return getInitParameter("prefix") + " ";
+ return getInitParameter("prefix");
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>