Re: [PHP3] this code doesn't activate autoresponder
| From: | (Richard Lynch) | Date: | Fri, 30 Jun 2000 17:08:12 +0000 |
| Subject: | Re: [PHP3] this code doesn't activate autoresponder | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4066@lists.php.net to get a copy of this message | ||
In article <E133mKL-0004Wa-00@mail3.intekom.com>, ntheron@intekom.co.za
("Neels") wrote:
> Hi,
>
> I use a request form on my site which php mails to an
> autoresponder at my host (Virtualis) using the code below (the
> autoresponder as supplied by Virtualis also gives me the opportunity
> to specify an address to forward the request). On testing it I get no
> response from the autoresponder - neither the autoresponse nor the
> forwarded copy.
>
> It works fine when I send from a mail client (in this case the From:
> address looks right), but not from the web-form. I have tried
> variously to use the From, Reply-To headers etc, but to no avail.
You probably need both From and Reply-To headers separated by \r\n.
$mail = 'ntheron@intekom.co.za';
$headers = "From: $mail\r\n";
$headers .= "Reply-to: $mail\r\n";
$success = mail ('auto@mydomain.com', 'subscribe', "subscribe
$mail\r\n",
$headers);
if ($success){
echo "Successfully inject mail to the Internet.<BR>\n";
}
else{
echo "Our letter carrier is dead.<BR>\n";
}
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)