Bug #73934 [Opn->Fbk]: Envelope Sender (-f) no longer working?
Edit report at https://bugs.php.net/bug.php?id=73934&edit=1
ID: 73934
Updated by: requinix@php.net
Reported by: core905 at gmail dot com
Summary: Envelope Sender (-f) no longer working?
-Status: Open
+Status: Feedback
Type: Bug
Package: Mail related
PHP Version: 7.1.0
Block user comment: N
Private report: N
New Comment:
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?
Previous Comments:
------------------------------------------------------------------------
[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
Thread (9 messages)