954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mail function show me@127.0.0.1 as sender

my problem is when i compose an email in html i get mail@127.0.0.1 as a sender. if i take off the HTML format then everything is ok.
Here is the headers:

$headers = " From: mywebsite.ca" . "\n" . "Replay-To: Do Not Replay". "\n" . "X-Mailer: PHP/" . phpversion();
$headers .= "Content-type: text/html; charset=iso-8859-1";


If you know whats wrong with my headers please let me know

Thank you

oree
Newbie Poster
16 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

Replace "Replay" by "Reply". Replace "\n" by "\r\n". Add a "\r\n" to the first header to separate it from the second.

$headers = "From: mywebsite.ca\r\nReply-To: Do Not Reply\r\nX-Mailer: PHP/" . phpversion();
$headers .= "\r\nContent-type: text/html; charset=iso-8859-1";

Then try again.

smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254
 

awesome thank you!

oree
Newbie Poster
16 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: