You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Shal Jain <sh...@intertechsys.com> on 2001/11/19 18:46:07 UTC

PassThrough node

Can a custom mailet derived from GenericMailet, programmatically control -
(on a per Mail obj basis) whether it should
be passed through to the next mailet/processor or not. i.e. ignore the value
of <passThrough> if necessary




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: PassThrough node

Posted by Oki DZ <ok...@pindad.com>.
On Mon, 19 Nov 2001, Shal Jain wrote:
> Can a custom mailet derived from GenericMailet, programmatically control -
> (on a per Mail obj basis) whether it should
> be passed through to the next mailet/processor or not. i.e. ignore the value
> of <passThrough> if necessary

Yes, all you need is to set the mail's state.
public void service(Mail mail) {
  // your code
  // eg: getMailetContext().sendMail(sender, recipients, message);
  if (!<send to next mailet>)
    mail.setState(Mail.GHOST);
}

Oki




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>