Is it possible to change the Return-Path value in emails are sending via mail() function of PHP ?
It's value is '[email protected]' in emails I send in my site and it causes some problems on email delivery failed process. I want to set it to my email address.
Here's the code I have tried:
$headers = 'MIME-Version: 1.0' . "\n";
$headers .= "Content-type: text/html; charset=utf-8" . "\n";
$headers .= "Return-Path: <[email protected]>"."\n";
$headers .= "Errors-To: <[email protected]>"."\n";
// Additional headers
$headers .= "To: [email protected] <[email protected]>" . "\n";
$headers .= "From: [email protected] <[email protected]>";
// Mail it
mail('[email protected]', 'test', 'salam', $headers, "f");