You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Noel J. Bergman" <no...@devtech.com> on 2002/08/05 19:23:54 UTC
[PATCH] mailets/Redirect.java
At Peter's request, this is a re-submit of the patch from 30 July 2002.
At Peter's request, this is a re-submit of the patch from 1 August 2002.
This patch 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 javadoc has been
updated to document this technique to preserve whitespace.
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.