Posted by windub on 11/30/07 18:06
Hi...
I would like to capture an email address from a form and send a copy
of the mail to that user. Can anyone give the correct code?
Below is the script I am using.
Thanks for your help.
<?php
/
$sendTo = "peter@deahipprovider.co.uk";
$subject = "New Enquiry";
$headers = "From: " . $_POST["firstname"] ." ". $_POST["lastname"] .
"<" . $_POST["email"] .">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
$sendTo = ["email"];
?>
[Back to original message]
|