Hi!

Thanks for the fast answer, but I'm afraid there was stupidity on my part 
involved -- the headers are actually there, I just misdiagnosed my problem..

Sorry for the false alarm,
Dinyar
________________________________________
Von: Eric Charles [[email protected]]
Gesendet: Dienstag, 01. Mai 2012 12:34
An: James Users List
Betreff: Re: Constructing a MailImpl object from a Mail object whitout losing 
headers

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]


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

Reply via email to