For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > April 2006 > #37122 [Ana->Csd]: sendmail_from is Return-Path:, not From:









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #37122 [Ana->Csd]: sendmail_from is Return-Path:, not From:
vrana@php.net

2006-04-26, 7:58 am

ID: 37122
Updated by: vrana@php.net
Reported By: php-bugs at t43 dot mine dot nu
-Status: Analyzed
+Status: Closed
Bug Type: Documentation problem
Operating System: Windows
PHP Version: 5.1.2
New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.

"This directive also sets the "Return-Path:" header."


Previous Comments:
------------------------------------------------------------------------

[2006-04-25 12:45:10] bjori@php.net

> "sendmail_from": Which "Return-Path:" mail address should be used in

mail sent from PHP under Windows.
> If not set, and From: is given in $headers, From: gets duplicated as

"Return-Path:" as well.
It's not a PHP "problem", it's your MTA that does this. But I do think
we should apply my previous patch.

> If none is set, mail() does fail.

It is noted at php.net/function.mail that the "From:" header is
required.

> Please note at least three points:

Your last two are noted in the manual

-Hannes

------------------------------------------------------------------------

[2006-04-23 23:36:43] php-bugs at t43 dot mine dot nu

First big thanks that you did something on my report.

I'm not fluent in the php-manual editing or in english language, but it
works yet a bit different:

"sendmail_from": Which "Return-Path:" mail address should be used in
mail sent from PHP under Windows. (If not set, and From: is given in
$headers, From: gets duplicated as "Return-Path:" as well. If none is
set, mail() does fail. Again, this is for Windows).

Please note at least three points:
- I don't know why Return-Path: seems required by SMTPs, but every
single mail I looked at has it. According to RFC2822, Sender: would be
more required, but it never occurred to me.
- mail() on Windows is entirely different from mail() on Un*x.
- mail() is mainly for beginners like me. Experienced people (like I'll
be, soon) use PHPmailer, and later go for PEAR::mail.

Nevertheless it makes sense to have mail().

------------------------------------------------------------------------

[2006-04-23 22:02:22] bjori@php.net

I've managed to get my hands on windows machine to verify this.

It is correct, for what ever reason the sendmail_from php.ini directive
is used as "Return-Path" too and it can't be changed via the
additional_headers parameter.

If "From:" header isn't set as additional header the sendmail_from ini
directive is used.

How do you feel about the following patch?
http://php.is/bugs/37122/win32.mail.ini.patch.txt

------------------------------------------------------------------------

[2006-04-23 14:12:32] php-bugs at t43 dot mine dot nu

The comment from bjori@php.net does not match what I have observed, in
Windows. I observe exactly the opposite, sentence by sentence.

I looked at the mails produced on the receiver side, of course. Others
have also observed, and reported, that sendmail_from makes the
Return-Path: header.

------------------------------------------------------------------------

[2006-04-23 13:37:55] bjori@php.net

AFAICT "Return-Path" isn't set by PHP at all unless you specificly put
it in the headers yourself.

The sendmail_from however seems to override (if specified) the "From"
header which either needs to be documented or fixed.

Possible fix: http://php.is/bugs/37122/win32.sendmail.patch.txt

(Reclassified as php bug).
-Hannes

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/37122

--
Edit this bug report at http://bugs.php.net/?id=37122&edit=1
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com