Simple mail() question
Moderator: General Moderators
Simple mail() question
How do you change the name from the "From" field when mail is received when using mail()? I already checked out the mail() function but I probably just missed it so I thought maybe you would know.
Re: Simple mail() question
Set the "From" header.
Re: Simple mail() question
I already have this as my headersSyntac wrote:Set the "From" header.
Code: Select all
$headers = "Reply-To: site@domain.com\r\n";
$headers .= "From: site@domain.com\r\n";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
Re: Simple mail() question
So is it working?
Re: Simple mail() question
In the From header, I swapped site@domain.com with a name and I also tried it with name<site@domain.com> but still nothing. What else should I try?Syntac wrote:So is it working?
Re: Simple mail() question
Try changing the "Reply-To" header as well. Some clients ignore the "From" header.
Re: Simple mail() question
Nope, still nothing. I'm not getting the text I typed in the "From" and "Reply-To" header. Any guesses?Syntac wrote:Try changing the "Reply-To" header as well. Some clients ignore the "From" header.
Re: Simple mail() question
It works for me... Sorry, I don't know.
Re: Simple mail() question
I guess it must be a server thing. Thanks anyway for trying to help me out.Syntac wrote:It works for me... Sorry, I don't know.