Hi Dinyar,

So you run this code in a mailet and the original headers are no more there?

If you can send us (on via a JIRA, or a gist) the full code, we could take a look at it to help.

Thx,
Eric


On 04/30/2012 04:25 PM, Dinyar Rabady wrote:
  Hi!

I am trying to implement VERP in the following way:

                 String address = recipient.toString();
                 MailImpl verpMail = new MailImpl(mail);
                 String verpFrom = "[email protected]"
                 MailAddress reversePath = new MailAddress(verpFrom);
                 verpMail.setSender(reversePath);
                 verpMail.getMessage().setHeader(RFC2822Headers.RETURN_PATH, /* 
my reverse path */);
                 // This is a header used by very old versions of sendmail to 
find the bounce address.
                 verpMail.getMessage().setHeader("Errors-To", /* my reverse 
path */);
                 // A header set by Amazon.
                 verpMail.getMessage().setHeader("Bounces-to", /* my reverse 
path */);
                 verpMail.getMessage().saveChanges();
                 getMailetContext().sendMail(verpMail);
                 mail.setState(Mail.GHOST);

But it seems that the headers from the original 'mail' object (not the headers 
I am setting here) are lost. Is this on prupose and is there a way for me to 
circumvent this?

Best,
Dinyar


--
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to