I just ran a test and got back a bounce as described in my email One thing that I did forgot to include in the code was the following line
context.storeMail(mail.getSender(),new MailAddress(unfiledEmailAddr), mail.getMessage()); which is immediately followed by context.bounce(mail,errMsg,new MailAddress(deliveryFailureAddr)); Could the fact that I am storing the message against a known location somehow alter the bounce behaviour The store was strictly done for some debugging purposes and got left in there. I havent' tried the mailet with the store method commented out. I have received bounced emails w/ the original packaged as an attachment for cases where I'm originating the email and James is unable to deliver to an external domain. I'd like to get the same bounce behaviour when James is receiving. -shal ----- Original Message ----- From: "Noel J. Bergman" <[EMAIL PROTECTED]> To: "James Users List" <[EMAIL PROTECTED]> Sent: Wednesday, October 16, 2002 2:19 PM Subject: RE: mail bounce question > 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]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
