email posting engine not working?? - what is wrong?
Posted: Thu Mar 13, 2008 1:23 pm
Hey,
I have developed this basic email submission engine and it will not work. It keeps looping to the "Email did not submit!!!" echo statement.
Does anyone have any ideas why this will not work??
Here is the code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$comments = $_POST['comments'];
$content = "($name) with an email of ($email) made the following comments on your site: ($comments)";
$test = mail('joshyoung@localhost', 'Contact Response', 'test');
print_r($test);
if ($test)
{
echo "Email was sent sucessfully";
}
else {
echo "Email did not submit!!!";
}
echo "<br></br>";
?>
I have developed this basic email submission engine and it will not work. It keeps looping to the "Email did not submit!!!" echo statement.
Does anyone have any ideas why this will not work??
Here is the code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$comments = $_POST['comments'];
$content = "($name) with an email of ($email) made the following comments on your site: ($comments)";
$test = mail('joshyoung@localhost', 'Contact Response', 'test');
print_r($test);
if ($test)
{
echo "Email was sent sucessfully";
}
else {
echo "Email did not submit!!!";
}
echo "<br></br>";
?>