afridy
1
Hello,
i am sending new account activation mail from activation@mysite.com.
but the client’s mail header shows the mail has come from : my-hosting-account-name@box780.bluehost.com
i have also created an email account activation@mysite.com in cpanel
what could be wrong ?
rpkamp
2
What is the code that is sending the emails? Without code it’s kind hard to determine what’s wrong.
afridy
3
Hai Scallioxtx,
this is the header
$headers = 'From: mysite.com' . "\\r\
" .
'Reply-To: activation@mysite.com' . "\\r\
" .
'X-Mailer: PHP/' . phpversion();
$headers .= 'MIME-Version: 1.0' . "\
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\
";
$headers .= 'Content-Transfer-Encoding: 8bit'. "\
";
$headers .= 'X-Priority: 3' . "\
";
$headers .= 'X-MSMail-Priority: Normal' . "\
";
rpkamp
4
You should enter the email address in the FROM header as well:
$headers = 'From: mysite.com <activation@mysite.com>' . "\\r\
" .
'Reply-To: activation@mysite.com' . "\\r\
" .
'X-Mailer: PHP/' . phpversion();
$headers .= 'MIME-Version: 1.0' . "\
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\
";
$headers .= 'Content-Transfer-Encoding: 8bit'. "\
";
$headers .= 'X-Priority: 3' . "\
";
$headers .= 'X-MSMail-Priority: Normal' . "\
";
No need to add X-Mailer BTW. It doesn’t do anything and I’m pretty sure PHP adds it itself too if you omit it.
afridy
5
Thanks so much for correcting the header. works charm!!!