Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web form

Status
Not open for further replies.

Cevilian

Programmer
Apr 21, 2005
16
US
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");
?>
===========================================================
 
sorry! didn't describe my previous post properly! The above code fails to send the email to accounts on a qmail server.

It is throwing " to the server where the sender domain is.

Any help is greatly appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top