I'm trying to use AbstractRedirect.java to make some custom redirect
behaviour. (different to the default redirection)

I need to use the originalMail.getUserName() to decide who to forward to.

Is it the right approach to over-ride this method in AbstractRedirect?

        protected void setRecipients(
                Mail newMail,
                Collection recipients,
                Mail originalMail)

I looked at the built in Forward mailet, only the no argument setX methods
get over-ridden.  Is it valid to over-ride the setX(mail, collection, mail)
signatures?

Then do
((MailImpl) newMail).setRecipients(forwardedAddresses);
With the new addresses to forward to?

Is there more I need to do to get forwarding working?

I seem to just get in a loop. ie I forward a "A" which then comes back
through the mailet who forwards to "A" (repeat).

What I am trying to achieve is to "forward as a copy", ie send to the
original recipient, and forward also to another address.

Has anyone any tips?  Is using AbstractRedirect the right thing to do?

Regards
Lindsay Smith


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to