The messaging_phpmailer module ignores headers given to it, particularly the Message-ID and Reply-To headers provided by mail2web.

The attached patch corrects the problem, enabling messaging_phpmailer to work with mail2web.

Comments

jose reyero’s picture

Status: Active » Fixed

Fixed for both 5.x and 6.x. Thanks

jmcclelland’s picture

Hm. I'm not sure my patch is a very good one after all, but I'm also not sure how to improve it.

It seems as though phpmailer will add it's own Message-ID header. With my patch, we add a second one. However, I just upgraded to the dev version of mailhandler (2008-Dec-25 release of 5-x.1.x-dev) and mailhandler is only taking the phpmailer's provided Message-Id and ignoring the other one. I've looked through the phpmailer code and can't figure out a way to suppress the phpmailer Message-Id header. Any ideas??

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

batje’s picture

Status: Closed (fixed) » Needs review

The patch is the following:

change line 85 from
$mail->AddCustomHeader('Message-ID: ' . $message['headers']['Message-ID']);
to
$mail->MessageID = $message['headers']['Message-ID']);

The result of the current implementation is that the HeaderID is added twice. Some mailclients return the wrong one. (like Kontakt)

sagannotcarl’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new639 bytes

Thanks for this batje, this was exactly what I was looking for!

There was an extra ) in the line above. Here is a patch of your change that solves the problem for me.

samhassell’s picture

Mr Sagan's patch in #5 works for me with latest dev.

Thanks guys.

jose reyero’s picture

Status: Reviewed & tested by the community » Fixed

Ok, looks good.

Committed, thanks for the patch and for the testing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.