I have a form that is PHP. This script works and says that it is successful, but I do not receive the email.
if(isset($_POST['name']) and isset($_POST['email']) and isset($_POST['phone']))
{
$EMAIL = "anem@il.com";
$inEmail = $_POST['email'];
$subject = "Enquiry from ".$POST['name'];
$name = $_POST['name'];
$message = "Enquiry from: ".$name."\nEmail: ".$inEmail."\nPhone: ".$phone."\n\nDeparture Date: ".$departureDate."\n\nreturnDate: ".$returnDate;
$message = wordwrap($message, 70);
if (mail($EMAIL, $subject, $message))
{
echo "Enquiry sent!";
} else
{
echo "fail!";
}
?>
The message "Request Sent" appears.
I have a postfix installed and I also tried installing sendmail. I scanned the local host using nmap and the smtp port is open.
Can anyone see the reason the mail was not sent.
source
share