Page 1 of 1
Simple mail() question
Posted: Sun Nov 16, 2008 7:14 pm
by enchance
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
Posted: Sun Nov 16, 2008 7:29 pm
by Syntac
Set the "From" header.
Re: Simple mail() question
Posted: Sun Nov 16, 2008 7:35 pm
by enchance
Syntac wrote:Set the "From" header.
I already have this as my headers
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";
What should I add?
Re: Simple mail() question
Posted: Sun Nov 16, 2008 7:37 pm
by Syntac
So is it working?
Re: Simple mail() question
Posted: Sun Nov 16, 2008 7:52 pm
by enchance
Syntac wrote:So is it working?
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?
Re: Simple mail() question
Posted: Sun Nov 16, 2008 7:55 pm
by Syntac
Try changing the "Reply-To" header as well. Some clients ignore the "From" header.
Re: Simple mail() question
Posted: Sun Nov 16, 2008 8:02 pm
by enchance
Syntac wrote:Try changing the "Reply-To" header as well. Some clients ignore the "From" header.
Nope, still nothing. I'm not getting the text I typed in the "From" and "Reply-To" header. Any guesses?
Re: Simple mail() question
Posted: Sun Nov 16, 2008 8:04 pm
by Syntac
It works for me... Sorry, I don't know.
Re: Simple mail() question
Posted: Sun Nov 16, 2008 8:09 pm
by enchance
Syntac wrote:It works for me... Sorry, I don't know.
I guess it must be a server thing. Thanks anyway for trying to help me out.