This patch enables the Forward mailet to utilize the
<passThrough></passThrough> property in config.xml.
Was this left out intentionally? I would like to use the functionality
without switching to the slightly more complicated Redirect mailet. I have
implemented it such that it is backwards compatible, i.e. if the property is
absent it will not pass through.
I notice, though, that the implementation of the Redirect mailet is opposite
(if I am reading it correctly.) If the property is missing, it _will_ pass
through. Should the default behaviour be the same for these two mailets?
-- Sam Kirkpatrick
p.s. First time patch submission. I thought I would start small. I hope to
be able to contribute more in the future. If I am not doing it in the
prescribed manner, please let me know.
Index: Forward.java
===================================================================
RCS file:
/home/cvspublic/jakarta-james/src/java/org/apache/james/transport/mailets/Fo
rward.java,v
retrieving revision 1.2
diff -u -r1.2 Forward.java
--- Forward.java 18 Jan 2002 02:48:38 -0000 1.2
+++ Forward.java 18 Jun 2002 17:46:11 -0000
@@ -36,7 +36,9 @@
public void service(Mail mail) throws MessagingException {
getMailetContext().sendMail(mail.getSender(), newRecipients,
mail.getMessage());
- mail.setState(Mail.GHOST);
+ if(! (new Boolean(getInitParameter("passThrough"))).booleanValue())
{
+ mail.setState(Mail.GHOST);
+ }
}
public String getMailetInfo() {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>