Home » Mail » Mail » Bug #5017
Set envelope sender
Details
| Request #5017 | Set envelope sender |
|---|---|
| Submitted | 2005-08-06 18:26 UTC |
| From | gsstark at mit dot edu |
| Assigned | chagenbu |
| Status | Closed |
| Package | |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-08-06 18:26 UTC] gsstark at mit dot edu
Description:
------------
When sending email there are three pieces of data, the
envelope sender, the envelope recipient and the data of
the message including headers and body. The interface
currently provides a way to set the recipients and the
body of the message but no way to set the envelope sender.
There are many reasons to want to set the envelope sender,
but the main one that comes to mind is to generate
VERP-style addresses for bounce processing. But
regardless, it just seems incomplete to only provide
access to two of the three parts of a message.
[2005-08-09 12:50 UTC] gsstark at mit dot edu
That's my complaint. What if I don't want it to be the
same as the From header?
[2005-09-01 09:46 UTC] neuhauser+pear dot php dot net at sigpipe dot cz
Jon, "From: " / "MAIL FROM: <>" mismatch is what makes email bounces, mailing lists, and other things, work at all. Please do add the feature.
On a related note, $recipients (1st param) in Mail::send is busted: it bogusly qualifies the addresses.
[2006-02-16 08:31 UTC] shot at hot dot pl
‘I suppose there are cased where that’s useful, but mismatching those fields can also make the resulting message appear suspect (e.g., a forged From: address).’
I’d say one of the quite useful cases is putting anything beyond the bare email address (like, say, the full name of the recipient).
MAIL FROM:<> cannot contain anything beyond the clear address, and the fact that MAIL FROM:<"Piotr Szotkowski" <shot@hot.pl>> works in Postfix is actually Postfix being nice; try the same with Courier and you’ll get a syntax error.
[2006-02-16 11:42 UTC] shot at hot dot pl
From reading the source, it seems setting the Return-Path header takes care of the MAIL FROM:<> problem (and it does seem to work).
So it's actually possible to set the MAIL FROM:<> to a different value than From: header, by setting $headers['Return-Path'].
[2006-02-18 08:06 UTC] pc at hillside dot co dot uk
Can the sendmail interface be made to have the same behaviour
as the SMTP interface - ie taking $from from Return-Path?
For reasons why this is not Irrelevant and why I need to set
the Envelope different from the From - see http://
www.openspf.org/webgenerated.html
[2007-02-01 19:17 UTC] andyNOOSSPPAM at paradigm-reborn dot com
I can confirm that setting the Return-Path header will set the MAIL FROM: <> envelope when using the SMTP transport. Another related note is that the $verp settings are dependent on the MTA, and that Exim (as of 4.63) doesn't support them.
I got the impression that setting $verp would work it's own pre-MTA magic. Just a note to save some time for others.
[2007-02-18 06:02 UTC] tms at infamous dot net
It's great that the Return-Path magic works.
It's highly suboptimal that it's not documented, that I only found out about thiss functionality through desperate and frantic Googling. IMHO this information needs to be in the Mail::send() page.