Eric, Thanks for replying and for all the great work you are doing on Apache James. I did submit https://issues.apache.org/jira/browse/JAMES-1403 .
Thanks On Wed, Apr 18, 2012 at 5:28 AM, Eric Charles <[email protected]> wrote: > Hi, > > Could you please open a JIRA (when > https://issues.apache.org/jira/browse/JAMES will be back on line) and post > there your mail + additional context : what do you need this, why can't you > do what you want with the current impl/conf,... The reason does not jump to > me here, but I must admit I am on too many tracks atm... > > Thx, Eric > > > > On 04/17/2012 09:31 PM, Idea Harness wrote: >> >> Hi, >> >> I think it would be very useful to add an overloaded bounce() method >> to org.apache.mailet.MailetContext and >> org.apache.james.mailetcontainer.impl.JamesMailetContext >> accepting a String state parameter (similar to a sendMail() method >> that already has it) with the following implementation : >> >> >> public void bounce(Mail mail, String message, MailAddress bouncer, >> String state) throws MessagingException { >> >> if (mail.getSender() == null) { >> if (log.isInfoEnabled()) >> log.info("Mail to be bounced contains a null (<>) >> reverse path. No bounce will be sent."); >> return; >> } else { >> // Bounce message goes to the reverse path, not to the >> Reply-To >> // address >> if (log.isInfoEnabled()) >> log.info("Processing a bounce request for a message >> with a reverse path of " + mail.getSender().toString()); >> } >> >> MailImpl reply = rawBounce(mail, message); >> // Change the sender... >> reply.getMessage().setFrom(bouncer.toInternetAddress()); >> reply.getMessage().saveChanges(); >> // Send it off ... with null reverse-path >> reply.setSender(null); >> >> // Set the specified state, which is not necessarily the root >> state >> reply.setState(state); >> >> sendMail(reply); >> LifecycleUtil.dispose(reply); >> } >> >> This would allow the callers to specify the state of the bounced >> (reply) Mail, rather than going to the root state as is now. >> >> Thanks >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > -- > eric | http://about.echarles.net | @echarles > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
