
August 7th, 2005, 02:07 PM
|
 |
Spontaneously Present
|
|
|
|
|
reply to mail() help
to keep this short and straight to the point when i send email via this code:
PHP Code:
$to = "email@gmail.com";
$email = $_POST['required-email'];
$name = $_POST['required-name'];
$company = $_POST['company'];
$street = $_POST['street'];
$state = $_POST['state'];
$city = $_POST['city'];
$zip = $_POST['zip'];
$phone = $_POST['phone'];
$message = $_POST['comments'];
$subject = "Machine Tooling Inquiry";
$headers = "From: $name\r\n Reply-To: $email\r\n";
$message = wordwrap($message, 70);
$citystatezip = $city . " " . $state . " " . $zip;
$info = "\n$name \n$company \n$street \n$citystatezip \n$phone \n";
$body = $info.$message;
// Send
mail($to, $subject, $body, $headers);
//echoed to make sure everything got posted and sent
echo $email;
echo $name;
echo $company;
echo $street;
echo $state;
echo $city;
echo $zip;
echo $phone;
echo $message;
the reply address is the varaiable $name along with @ and then my hosting sites address... so $name@myhost.com
ive tried to specify the reply address by writing this header:
PHP Code:
$headers = "From: $name\r\n Reply-To: $email\r\n";
but its not coming up with that $email that i want.. how can i overwrite the reply email its sending?
|