I have a contact page where users can contact me via that form. But I'm getting this error,
Warning: mail() [function.mail]: SMTP server response: 530 Relaying not allowed - sender domain not local in D:\INETPUB\VHOSTS\nextoption.in\httpdocs\auto-replay\contact.php on line 33
My Php code is,
if(isset($_POST['send'])) //if "email" is filled out, send email
{
//send email
$email1=$_POST['email'];
$headers = "From: My site\r\n";
$headers .= "Reply-To:
[email protected]\r\n";
$headers .= "Return-Path:
[email protected]\r\n";
$headers .= "X-Mailer: Drupal\n"; $headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $to = "
[email protected]";
$subject = "Test mail"; $message = "Hello!This is a simple email message
$from = $email1; mail($to,$subject,$message,$headers);
?
alert ("Enquiry form submited successfully ! We'll get back you soon ");
What will be my fault..... What is the Fault in SMTP Server?