Hi.
I'm using w3's php tutorials, and I'm trying to get the mail() function working.
I'm running Ubuntu 7.10 with apache 2 and php5.
I'm using a form to send a message, but at both comcast and hotmail destinations the mail never reaches. Here's the code I'm using:
<html>
<body>
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail( "******@comcast.net", "Subject: $subject",
$message, "From: $email" );
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mail.php'>
From Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
}
?>
</body>
</html>
Any ideas what could be going wrong? Is there something in php.ini that I'm missing?