#29122 [NEW]: mail function ignoring -f arg as 5th argument

From: Date: Tue, 13 Jul 2004 16:23:08 +0000
Subject: #29122 [NEW]: mail function ignoring -f arg as 5th argument
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-62153@lists.php.net to get a copy of this message
From: brian dot foddy at nwa dot com Operating system: Solaris 2.8 PHP version: 5.0.0RC3 PHP Bug Type: Mail related Bug description: mail function ignoring -f arg as 5th argument Description: ------------ The mail functions additional parameters argument is ignoring a "-f" argument. I need to send sendmail a -f argument to change the Return-Path outbound header to get past some email spam settings. This same code worked fine in the previous version I used (4.2.3). Configure as reported by phpinfo: './configure' '--with-apxs=/apps/soc/apache/bin/apxs' '--prefix=/apps/soc/apache/php5' '--with-sybase-ct=/apps/soc/sybase/OCS-12_0' '--enable-track-vars' '--with-config-file-path=/apps/soc/apache/php5' '--enable-trans-sid' '--with-ldap' '--enable-soap' '--with-libxml-dir=/apps/soc/' '--with-mysql=/apps/soc/mysql/' Running on Apache 1.3.22, Solaris 2.8 Ultrasparc V880 machine. Reproduce code: --------------- <?php $t_headers = "From: brian.foddy@nwa.com\n"; $t_headers .= "X-Sender: xsender@nwa.com\n"; $t_headers .= 'X-Mailer: PHP/'.phpversion()."\n"; $t_headers .= "Mailing-List: SOC Issue Tracking - Mantis\n"; $t_headers .= "Content-Type: text/plain; charset=iso-8859-1\n"; $t_recipient = "brian.foddy@nwa.com"; $t_subject = "Subject line"; $t_message = "This is a test message.\n"; $t_message .= date; $result = mail( $t_recipient, $t_subject, $t_message, $t_headers, "-fapache@nwa.com"); if ( TRUE != $result ) { PRINT "PROBLEMS SENDING MAIL TO: $t_recipient<br />"; exit; } print nl2br($t_message); print ("<BR>Done"); ?> Expected result: ---------------- The resulting email should have a Return-Path: apache@nwa.com Actual result: -------------- Actual Return-Path in header is still raw machine name. Actual full email and header: X-UIDL: AAwojxcAAAwkL59LRkTWhqUambbW6YDo X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Received: from FMMSPJ34.pad.nwa.com ([139.72.12.25]) by AMMSPJ28.pad.nwa.com with Microsoft SMTPSVC(5.0.2195.5329); Tue, 13 Jul 2004 11:02:39 -0500 Received: from j1xrms01.nwa.com ([139.72.109.167]) by FMMSPJ34.pad.nwa.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 13 Jul 2004 11:02:38 -0500 Received: from j0xsas04.nwa.com (j0xsas04.nwa.com [139.72.109.213]) by j1xrms01.nwa.com (AIX4.3/8.9.3/8.9.3/NWA/990401/MAILHUB) with SMTP id LAA224760 for <brian.foddy@nwa.com>; Tue, 13 Jul 2004 11:02:38 -0500 Received: from f1xsds01.mn.nwa.com ([139.72.25.101]) by j0xsas04.nwa.com (SMSSMTP 4.0.0.59) with SMTP id M2004071311023832599 for <brian.foddy@nwa.com>; Tue, 13 Jul 2004 11:02:38 -0500 Received: (from apache@localhost) by f1xsds01.mn.nwa.com (8.11.7p1+Sun/8.11.7) id i6DG2c705433; Tue, 13 Jul 2004 16:02:38 GMT Date: Tue, 13 Jul 2004 16:02:38 GMT Message-Id: <200407131602.i6DG2c705433@f1xsds01.mn.nwa.com> To: brian.foddy@nwa.com Subject: Subject line From: brian.foddy@nwa.com X-Sender: xsender@nwa.com X-Mailer: PHP/5.0.0RC3 Mailing-List: SOC Issue Tracking - Mantis Content-Type: text/plain; charset=iso-8859-1 Return-Path: apache@f1xsds01.mn.nwa.com X-OriginalArrivalTime: 13 Jul 2004 16:02:38.0925 (UTC) FILETIME=[D21607D0:01C468F2] This is a test message. Tue Jul 13 11:02:38 CDT 2004 -- Edit bug report at http://bugs.php.net/?id=29122&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29122&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29122&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29122&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29122&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29122&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29122&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29122&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29122&r=support Expected behavior: http://bugs.php.net/fix.php?id=29122&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29122&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29122&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29122&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29122&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29122&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29122&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29122&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29122&r=float

« previous php.bugs (#62153) next »