Shal,

As I read James.bounce(Mail, String, MailAddress), it does send the original
as an attachment, and I've received bounces packaged just that way.

        --- Noel

-----Original Message-----
From: Shal Jain [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 14:44
To: James Users List
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]>

Reply via email to