note 26590 rejected from ref.mail by nicos
| From: | nicos@php.net | Date: | Wed, 06 Nov 2002 04:05:18 +0000 |
| Subject: | note 26590 rejected from ref.mail by nicos | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39022@lists.php.net to get a copy of this message | ||
I met a strange problem. I am using mail() to send mail to a autoresponder with vistors email
address so that the autoresponder will send the visotr followup mails. But the problem is the
autoresponder always recognize the senders address as <apache@ensim.needlesoft.com>, I tried
to send mail directly to the responder using email client, it works fine. I then tried mail() to
send the same mail to me, the From and To field are also OK. What's the problem? I tried all
the above snips and none of them solved it. Can anyone help?
Here is my code:
//$name is user's name from FORM, $email is user's email from FORM
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$name." <".$email.">\r\n";
$headers .= "To: ".$autorespondermail."
<".$autorespondermail.">\r\n";
$headers .= "Reply-To: ".$name." <$email>\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: Just My Server\r\n";
$headers .= "Return-Path: $email\r\n";
$headers .= "Return-Receipt-To: $email\r\n";
mail($autorespondermail,"subscribe","subscribe",$headers);