Jump to content

Mail error: SMTP server response: 550 The address is not valid.


Andy11548

Recommended Posts

This is the full error:

 

Warning: mail() [function.mail]: SMTP server response: 550 The address is not valid. in C:\wamp\www\test.php on line 17

 

And this is my code:

 

<?php
if(@$_POST['submit'])
{
   //Get data from form
   $name = $_POST['name'];
   $message = $_POST['message'];

   if(!empty($name)&&!empty($message))
   {
      $to = "[email protected]";
      $subject = "Activation Email from Andy Websites";
      $from = "[email protected]";
      $headers = "From: [email protected]";

      $body = "This is a email from ".$name."\n\n".$message;

      mail($to, $subject, $body, $headers); // LINE 17

   } else {
      echo 'Please fill out all fields.';
   }
}
?>

 

I'm really confused :S

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.