ID: 28976 User updated by: kdaniel at aosepc dot com Reported By: kdaniel at aosepc dot com -Status: Bogus +Status: Open Bug Type: Mail related Operating System: Windows\Apache PHP Version: 4.3.6 New Comment:
I don't see how that is possible because there is no way for the mail server to pick up the sendmail_from ini setting. PHP has to be using it somewhere. There needs to be a way to disable its use. Previous Comments: ------------------------------------------------------------------------ [2004-08-06 19:27:15] [EMAIL PROTECTED] I'm pretty sure that this header is added by the SMTP mail server and not by PHP itself. PHP first writes the generated headers to the SMTP stream, followed by any additional_headers you passed to mail(). Any headers following those you passed as additional_headers have been added by the transporting mail server (s). Looks like it is adding the SMPT "MAIL FROM" into Return_Path: ------------------------------------------------------------------------ [2004-07-21 04:04:12] kdaniel at aosepc dot com Yes, PHP is picking up the sendmail_from ini setting and sticking it into the mime headers as Return-Path. ------------------------------------------------------------------------ [2004-07-21 01:00:04] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2004-07-06 15:32:27] [EMAIL PROTECTED] You mean it uses the sendmail_from ini setting? ------------------------------------------------------------------------ [2004-06-30 18:19:53] kdaniel at aosepc dot com Description: ------------ The mail function always sticks in the Return-Path header based on the php.ini setting even though the email address does not correspond with the From header. There needs to be a way to either disable the Return-Path header from being inserted into the mail headers or the Return-Path should use the >From header email address. Reproduce code: --------------- $To = "[EMAIL PROTECTED]"; $Text = "This is a test."; $Html = "<H1>This is a test.</H1>"; $Subject = "PHP Mail Test"; $message = ""; $headers = "From: [EMAIL PROTECTED]"; $headers .= "X-Mailer: PHP4\n"; $headers .= "X-Priority: 3\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"==MIME_BOUNDRY_alt_main_message\"\n\n"; $headers .= "This part of the E-mail should never be seen. If you are reading this, consider upgrading your e-mail client to a MIME-compatible client."; $message .= "--==MIME_BOUNDRY_alt_main_message\n"; $message .= "Content-Type: text/plain; charset=ISO-8859-1\n"; $message .= "Content-Transfer-Encoding: 7bit\n\n"; $message .= $Text . "\n\n"; $message .= "--==MIME_BOUNDRY_alt_main_message\n"; $message .= "Content-Type: text/html; charset=ISO-8859-1\n"; $message .= "Content-Transfer-Encoding: 7bit\n\n"; $message .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"; $message .= "<HTML><BODY>\n"; $message .= $Html . "\n"; $message .= "</BODY></HTML>\n\n"; $message .= "--==MIME_BOUNDRY_alt_main_message--\n"; mail($To, $Subject, $message, $headers); Expected result: ---------------- Microsoft Mail Internet Headers Version 2.0 Received: from server ([ipaddress]) by servername.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 30 Jun 2004 12:16:25 -0400 Date: Wed, 30 Jun 2004 12:16:41 -0500 Subject: PHP Mail Test To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] X-Mailer: PHP4 X-Priority: 3 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="==MIME_BOUNDRY_alt_main_message" Return-Path: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> X-OriginalArrivalTime: 30 Jun 2004 16:16:25.0817 (UTC) FILETIME=[9794FC90:01C45EBD] --==MIME_BOUNDRY_alt_main_message Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --==MIME_BOUNDRY_alt_main_message Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --==MIME_BOUNDRY_alt_main_message-- Actual result: -------------- You will notice that the Return-Path header uses the php.ini setting and not the From header. Microsoft Mail Internet Headers Version 2.0 Received: from server ([ipaddress]) by servername.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 30 Jun 2004 12:16:25 -0400 Date: Wed, 30 Jun 2004 12:16:41 -0500 Subject: PHP Mail Test To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] X-Mailer: PHP4 X-Priority: 3 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="==MIME_BOUNDRY_alt_main_message" Return-Path: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> X-OriginalArrivalTime: 30 Jun 2004 16:16:25.0817 (UTC) FILETIME=[9794FC90:01C45EBD] --==MIME_BOUNDRY_alt_main_message Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --==MIME_BOUNDRY_alt_main_message Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --==MIME_BOUNDRY_alt_main_message-- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28976&edit=1