Jump to content

Mail() function shows SENDER Header wrong


doni49

Recommended Posts

I use a cPanel shared hosting account.

 

I have a PHP script that sends an email message.  EVERY message it sends out shows the "Sender" header with "[email protected]".  How can I prevent this?

 

I've got another PHP script that DOESN"T include the sender header at all--that would be ideal.  But I can't check the code used in that because it's a binary file that looks like a bunch of jibberish.

 

Here's my code:

  $to="MyName<[email protected]>";
  $headers = "From:  MyName Reminders<[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 Reminders<[email protected]>";


  $headers . = "To: MyName<[email protected]>"
  mail  ($to,$subject,$msgBody,$headers,'[email protected]');

 

Does anyone have any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/95620-mail-function-shows-sender-header-wrong/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.