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




Reply via email to