npglobal
asked on
Server name is being added in php mail header
Hi,
I am using php script for sending mail and i have code like:
$mailHeaders = "MIME-Version: 1.0\n";
$mailHeaders .= 'reply-to: <my-company-name>' . "\r\n";
$mailHeaders .= 'To: name1Tyagi <xx@exxx.com>, name2 <xxx@xxxx.in>' . "\r\n";
$mailHeaders .= 'Cc: cccc@ccc.com' . "\r\n";
$mailHeaders="From: <my-company-name>\nContent -Type: text/html; charset=iso-8859-1";
mail($mail_to,$mail_subjec t,$msg,$ma ilHeaders) ;
Mail is going fine but i am geeting some extra header in mail like:
reply-to <my-company-name>@<server- name>,
<my-company-name>@<server- name>,
<my-company-name>@<server- name>
to xxxx@xxxx.in
date 20 Nov 2007 12:05:16 -0600
subject <subject>
mailed-by <server-name>
I don,t want the <server-name> in my mail header ...i don't know why it is being added. i m not mentioned it in my code
note: <server-name> is the linux serve name or host provider ..yess our linux server hosted by this name(server-name)
please reply ASAP
Thankyou
I am using php script for sending mail and i have code like:
$mailHeaders = "MIME-Version: 1.0\n";
$mailHeaders .= 'reply-to: <my-company-name>' . "\r\n";
$mailHeaders .= 'To: name1Tyagi <xx@exxx.com>, name2 <xxx@xxxx.in>' . "\r\n";
$mailHeaders .= 'Cc: cccc@ccc.com' . "\r\n";
$mailHeaders="From: <my-company-name>\nContent
mail($mail_to,$mail_subjec
Mail is going fine but i am geeting some extra header in mail like:
reply-to <my-company-name>@<server-
<my-company-name>@<server-
<my-company-name>@<server-
to xxxx@xxxx.in
date 20 Nov 2007 12:05:16 -0600
subject <subject>
mailed-by <server-name>
I don,t want the <server-name> in my mail header ...i don't know why it is being added. i m not mentioned it in my code
note: <server-name> is the linux serve name or host provider ..yess our linux server hosted by this name(server-name)
please reply ASAP
Thankyou
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Out of curiosity, why do you not want your server name in the header?
That's how the receiving email server can validate the emails origin, so that it doesn't think it's spam.
That's how the receiving email server can validate the emails origin, so that it doesn't think it's spam.
Try calling your mail function like this...
Open in new window