t_kio
07-16-2008, 03:07 PM
Hi,
I have a simple mail function like this:
$headers = 'From: '.$myName.' <'.$myMail.'>'."\r\n".
'Reply-To: '.$myMail."\r\n".
'Return-Path: '.$myMail."\r\n".
'X-Mailer: PHP/'.phpversion();
mail($sendTo, $subject, $message, $headers);
The problem is, when the email arrived at one's inbox... the "From: "
header is always changed to <user>@ns123.hostname.com.
That was when I used my host's email accounts or of my other hosts.
But when I put some free addresses from services like GMail/Yahoo,
it went through without hassle (name and address remains unchanged).
Anybody can tell me what actually is going on, and maybe
the proper setup for the hosting's email accounts, so this
can just work properly?
Thank you in advance,
t_kio
I have a simple mail function like this:
$headers = 'From: '.$myName.' <'.$myMail.'>'."\r\n".
'Reply-To: '.$myMail."\r\n".
'Return-Path: '.$myMail."\r\n".
'X-Mailer: PHP/'.phpversion();
mail($sendTo, $subject, $message, $headers);
The problem is, when the email arrived at one's inbox... the "From: "
header is always changed to <user>@ns123.hostname.com.
That was when I used my host's email accounts or of my other hosts.
But when I put some free addresses from services like GMail/Yahoo,
it went through without hassle (name and address remains unchanged).
Anybody can tell me what actually is going on, and maybe
the proper setup for the hosting's email accounts, so this
can just work properly?
Thank you in advance,
t_kio