Hi Guys.
I am calling the mail() function from my php script
hosted on a linux box.
The problem that i have is no matter what i specify for
the headers, the From and Reply-to headings in the recieved
email always say "added by portage for apache [apache@vhost.xxxxxx.com]". This seems to be either
an apache config error, or it possibly could could be
in the php.ini file.
Has anyone else ran across anything like this?
A search here, and on google, didn't come back with anything helpful.
Any suggestions would be appreciated.
TIA.
Tony
<code>
<?php
$myemail= "xxxxx@xxxxx.com";
$message = "This is a test email.";
$from = "me@mydomain.com";
$replies = "me@mydomain.com";
$subject = "This is the subject line";
$headers = "From: Me <$from>\n";
$headers .= "Reply-To: $replies\n";
$headers .= "X-Sender: $from\n";
$headers .= "X-Mailer: PHP4\n";
$headers .= "X-Priority: 3\n";
$headers .= "Return-Path: $from\n";
$headers .= "MIME-Version: 1.0\n";
$retval = mail($myemail, $subject, $message,$headers);
echo "<h2> Your email has been sent. Bool Return Value = $retval</h2>";
?>
</code>
I am calling the mail() function from my php script
hosted on a linux box.
The problem that i have is no matter what i specify for
the headers, the From and Reply-to headings in the recieved
email always say "added by portage for apache [apache@vhost.xxxxxx.com]". This seems to be either
an apache config error, or it possibly could could be
in the php.ini file.
Has anyone else ran across anything like this?
A search here, and on google, didn't come back with anything helpful.
Any suggestions would be appreciated.
TIA.
Tony
<code>
<?php
$myemail= "xxxxx@xxxxx.com";
$message = "This is a test email.";
$from = "me@mydomain.com";
$replies = "me@mydomain.com";
$subject = "This is the subject line";
$headers = "From: Me <$from>\n";
$headers .= "Reply-To: $replies\n";
$headers .= "X-Sender: $from\n";
$headers .= "X-Mailer: PHP4\n";
$headers .= "X-Priority: 3\n";
$headers .= "Return-Path: $from\n";
$headers .= "MIME-Version: 1.0\n";
$retval = mail($myemail, $subject, $message,$headers);
echo "<h2> Your email has been sent. Bool Return Value = $retval</h2>";
?>
</code>