Hello there,
I am trying to include a Feedback form in my site. to test whether the customer can send an e-mail. The problem is that it does not work. When I press the Submit button the browser hangs for few minutes and I can see in the status bar "Waiting for fedorac1...". Then it goes through the code and reports that the mail has been sent. I have checked that the sendmail service is being started. Do I have to change something in the php.ini file?
Below is the mymail.php file:
<html>
<head>
<title> MYMail PHP. </title>
<body>
<?php
$name=$_POST['name'];
$email=$_POST['email'];
$comments=$_POST['comments'];
$to="abojilov@deephavenfunds.com";
$message="$name just filled in your comments form. They said:\n$comments\n\nCustomer's e-mail address was: $email";
if(mail($to,"Comments From Your Site",$message,"From: $email\n")) {
echo "Thanks for your comments.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
</body>
</html>
Is there something wrong with the code?
Any help is greately appreciated.
Tahnk you.