Does any one here see a reason for the following code used to deliver info from a webform to an email account on qmail server:
==========================================================
<?php
@extract($_POST);
$request=stripslashes($request);
$name=stripslashes($name);
$company=stripslashes($company);
$address1=stripslashes($address1);
$address2=stripslashes($address2);
$city=stripslashes($city);
$state=stripslashes($state);
$zip=stripslashes($zip);
$phone=stripslashes($phone);
$email=stripslashes($email);
$body="Name: $name\r\n";
$body .= "Company: $company \r\n";
$body .= "Physical Address: \r\n";
$body .= "--- $address1 \r\n";
$body .= ($address2) ? "--- $address2 \r\n" : '';
$body .= "--- $city, $state $zip \r\n";
$body .= "Phone: $phone \r\n";
$body .= "Email: $email \r\n";
$body .= "Request: $request \r\n";
$to = 'test@MYDOMAIN.com' . ', ';
$to .= 'user@MYDOMAIN.com';
$subject = 'Info Request from the website';
if(mail($to,$subject,$body))
{
header("location:contact_success.htm");
}
else
{
echo 'Sorry! Message could not be delivered. Please call xxx-xxx-xxxx';
}
//mail($to,$subject,$body,"From: $name <$email>");
//header("location:contact_success.htm");
?>
===========================================================
==========================================================
<?php
@extract($_POST);
$request=stripslashes($request);
$name=stripslashes($name);
$company=stripslashes($company);
$address1=stripslashes($address1);
$address2=stripslashes($address2);
$city=stripslashes($city);
$state=stripslashes($state);
$zip=stripslashes($zip);
$phone=stripslashes($phone);
$email=stripslashes($email);
$body="Name: $name\r\n";
$body .= "Company: $company \r\n";
$body .= "Physical Address: \r\n";
$body .= "--- $address1 \r\n";
$body .= ($address2) ? "--- $address2 \r\n" : '';
$body .= "--- $city, $state $zip \r\n";
$body .= "Phone: $phone \r\n";
$body .= "Email: $email \r\n";
$body .= "Request: $request \r\n";
$to = 'test@MYDOMAIN.com' . ', ';
$to .= 'user@MYDOMAIN.com';
$subject = 'Info Request from the website';
if(mail($to,$subject,$body))
{
header("location:contact_success.htm");
}
else
{
echo 'Sorry! Message could not be delivered. Please call xxx-xxx-xxxx';
}
//mail($to,$subject,$body,"From: $name <$email>");
//header("location:contact_success.htm");
?>
===========================================================