Why I'm getting an error like this - Warning: mail() [function.mail]: SMTP server response: 530 Relaying not allowed - sender domain not local in D:\INETPUB\VHOSTS\gaehambuilders.com\httpdocs\contacts.php on line 120 ?
Here is my php code,
if(isset($_POST['send']))
//if "email" is filled out, send email
{
//send email
$name=$_REQUEST['name'];
$email=$_POST['email'];
$cnum=$_REQUEST['cnum'];
$enq=$_REQUEST['enq'];
$email1=$_REQUEST['email'];
$to = "
[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = $email1;
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
?
alert ("Enquiry form submited successfully ! We'll get back you soon ");
Thanks in advance!