I have a shared hosting account on a server running cPanel. I've got a PHP script that sends mail using the mail function.
When the email message arrives, it has a "sender header" that shows [email protected].
I just moved from a different host a little more than a month ago and this didn't happen on the old host's server. The new host can't find any reason for it. I thought maybe there was some obscure setting.
When the email message arrives, it has a "sender header" that shows [email protected].
PHP:
$to="MyName<[email protected]>";
$headers = "From: MyName<[email protected]>\r\n";
//I added this line to try and FORCE it to use the proper name/address
//but I STILL get "Sender: <[email protected]>" in the headers.
$headers .= "Sender: MyName<[email protected]>";
$headers . = "To: recipient<[email protected]>"
mail ($to,$subject,$msgBody,$headers);