Ah... Thank you for the valuable information, Plum-Loco... 🙂
As for your question... I first tested my code in my W2K machine that has IIS5 and PHP 4.2.3, and I had no problem getting an email... and the server that you had seen the info on, that one is on Linux/Apache/PHP 4.3.1, and I do not get any mail at all...
Here is the script that I have used...
<?php
// surveyMail.php
$message = "";
$headers = "";
$CR = "\r";
// $CR = "<BR>";
$TAB = "\t";
$date = date("m/d/Y H:i:s");
$owner = $_POST['owner'];
$name = $_POST['name'];
$email = $_POST['email'];
$age = $_POST['age'];
$q1 = $_POST['q1'];
$q2 = $_POST['q2'];
$q3 = $_POST['q3'];
$q4 = $_POST['q4'];
$q5 = $_POST['q5'];
$q6 = $_POST['q6'];
$q7 = $_POST['q7'];
$q8 = $_POST['q8'];
$q9 = $_POST['q9'];
$a1 = $_POST['a1'];
$a2 = $_POST['a2'];
$a3 = $_POST['a3'];
$a4 = $_POST['a4'];
$a5 = $_POST['a5'];
$a6 = $_POST['a6'];
$a7 = $_POST['a7'];
$a8 = $_POST['a8'];
$a9 = $_POST['a9'];
$headers .= "From: New_Survey_Result\n";
$headers .= "Reply-To: $email\n";
$headers .= "X-Mailer: PHP/\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1";
$message .= "------------------------------" . $CR;
$message .= "Personal Information" . $CR;
$message .= "------------------------------" . $CR;
$message .= "Name : $name" . $CR;
$message .= "Email : $email" . $CR;
$message .= "Age : $age" . $CR;
$message .= "------------------------------" . $CR . $CR;
$message .= "------------------------------" . $CR;
for ($i = 1; $i <= 9; $i++)
{
$message .= stripslashes(${"q" . $i}) . $CR . $TAB . stripslashes(${"a" . $i}) . $CR . $CR;
}
$message .= "------------------------------" . $CR;
$message .= $date .$CR;
$message .= "------------------------------" . $CR;
echo("message=$message");
$send = mail($owner, "New Survey Result by $name", $message, $headers);
if ($send == true)
{
echo("&emailSent=true");
}
else
{
echo("&emailSent=false");
}
?>
Thank you for your time... 🙂