Bug #73934 [Fbk]: Envelope Sender (-f) no longer working?

From: Date: Sat, 14 Jan 2017 18:16:51 +0000
Subject: Bug #73934 [Fbk]: Envelope Sender (-f) no longer working?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206620@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73934&edit=1 ID: 73934 Updated by: cmb@php.net Reported by: core905 at gmail dot com Summary: Envelope Sender (-f) no longer working? Status: Feedback Type: Bug Package: Mail related PHP Version: 7.1.0 Block user comment: N Private report: N New Comment: Also consider to use something like sendmail_path=echo for debugging. Previous Comments: ------------------------------------------------------------------------ [2017-01-14 15:44:48] requinix@php.net There have not been any changes to mail() in PHP 7.1 so far. Are you sure that your MTA is honoring the -f parameter? What if you try using sendmail and -f from the command line? ------------------------------------------------------------------------ [2017-01-14 12:44:08] core905 at gmail dot com Description: ------------ I notice in PHP 7.0 when using mail() it is able to set the envelope-from (i believe this is also known as: Return-Path?) when i make use of the $additional_parameters field using "-f". But in PHP7.1 this no longer works. Test script: --------------- $to = "to@email.com"; $from = "from@email.com"; $subject = "my subject"; $message = "my body"; $headers = "From: $from" . "\r\n" . "Reply-To: $from" . "\r\n" . "Return-Path: $from" . "\r\n" . "X-Mailer: PHP/" . phpversion(); $params = "-f$from"; mail($to, $subject, $message, $headers, $params); Expected result: ---------------- the envelope-from (and return-path) doesnt match the "From" field in php7.1. It shows the servers own outgoing address not the one i gave for the from field. But when using the same test script in php7.0 it does match the from field and everything is correct. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73934&edit=1

« previous php.bugs (#206620) next »