Fw: [PHP] Email always set to server's email, why?
| From: | Kevin Stone | Date: | Mon, 17 Mar 2003 19:16:19 +0000 |
| Subject: | Fw: [PHP] Email always set to server's email, why? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140008@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Vernon" <vernon@comp-wiz.com>
To: <php-general@lists.php.net>
Sent: Monday, March 17, 2003 12:09 PM
Subject: [PHP] Email always set to server's email, why?
> All the email coming from a web site, even though I have set the Reply-To,
> have the Reply-To set to apache@servername. Anyone have any ideas why? I
> want the reply-to set to somethign else.
>
> Here is what I have:
>
> mail("$clubemail", "$subject", "$message" , "From:
> $email\r\n","Reply-To:
> $email");
I think the manual is confusing on this issue. The last parameter in the
mail() function must be passed as a single string. In other words:
$headers = "
From: $memail\r\n
Reply-To: $email\r\n";
// Note the quotes on your parameters are unnecessary.
mail($clubemail, $subject, $message , $headers);
HTH,
Kevin