I am getting this problem when i submit an online inquiry form. How i fix it.
My code is(mail.php) :
<?php
require_once 'admin/common/config.php';
// Read POST request params into global vars
$to = "engmizan@gmail.com";
$from = $_POST['email'];
$subject = "Online Enquiry / Order Form";
// registration information
$name= $_POST['name'];
$desig= $_POST['desig'];//desig
$compname= $_POST['compname']; //COM
$address= $_POST['address'];
$country= $_POST['country'];
$contact = $_POST['contact'];
$email= $_POST['email'];
$comments= $_POST['comments'];
// Sending Information
$message ="Buyer/User Info
Name : $name
Designation :$desig
Company Name :$compname
Address :$address
Nationality :$country
Contact No:$contact
email :$email
Comments :$comments";
// Send the message
$headers .= "Content-type: text/html\r\n";
$headers .= "From: $from\r\n";
$ok = @mail($to, $subject, $message, $headers);
if ($ok)
{
$msg= "You Mail and comment Successfully Send";
header ("location:confirm.php");
}
else {
$msg= "Sorry! Mail could not be sent. ";
header ("location:deny.php?msg=$msg");
}
?>