Oops - sent the query too soon.
I think I found most of the answer
void handleError(Mail mail,void errMsg)
{
mail.setState("MyCustomBounce");
}
... somewhere in spoolmanager...
<processor name="MyCustomBounce">
<mailet match="All" mailet="NotifySender">
</mailet>
</processor>
Howerver,
I'd still like to include a specific error message and then include the
original email as an attachment in the bounce
Per javadocs
Sample configuration: nobounce@localhost true Notice attached to the message
(optional)
How can I supply the notice w/out configuring it in config.xml
If I use context.setAttribute("MY_ERR_MSG",errMsg) and extend NotifySender
mailet I think I could get what I need (haven't looked at the code of
NotifySender yet).
Is there a better approach for what I'm trying to do.
-shal
----- Original Message -----
From: "Shal Jain" <[EMAIL PROTECTED]>
To: "James Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 16, 2002 1:44 PM
Subject: mail bounce question
James ver 2.0a2 running under Win2K
Within a custom mailet I have the following code that handles certain error
conditions:
void handleError(Mail mail,String errMsg)
{
try{
MailetContext context = this.getMailetContext();
context.bounce(mail,errMsg,new MailAddress(deliveryFailureAddr));
mail.setState(Mail.GHOST);
}
catch(Exception nex)
{
log(nex.getMessage());
mail.setState(Mail.ERROR);
}
}
The bounce does work but the bounced mail appears in the following form
<< errMsg >>
_____________________________
<< body of the original message >>
If I want to bounce the initially received email back as an attachment -
what's the preferred approach ?
Do I need to use context.SendMessage() and try to compose the MimeMessage
myself or can I redirect to the
default bounce processor where all the work is already being done.
TIA
-shal
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>