I am facing a strange error when I execute a php mail script. Its related to server could not verify the sender. I see following error:
Failed to add recipient email@domain.com [SMTP: Invalid response code received from server (code:550, response: Verification failed for unrouteable address Sendor verify failed)]

Would you know why this error could pop up?

require_once "Mail.php";
$kw = (string)$_GET['keyword'];
$e = (string)$_GET['emailid'];
die('Could not connect: ' . mysql_error());


mysql_query("INSERT INTO mail_alert (uname,emailid,password,keyword)values('$kw','$e','$uname','$password')");

/*$qry="select * from email_alert WHERE emailid='$e'";
$result=mysql_query($qry)or die("Couldn't execute query");
while ($row=mysql_fetch_array($result))
$kyw = $row["keyword"];
//echo $kyw;
// echo $email;

/*$to = 'email@domain.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From:mail.domain.com' . "\r\n" ;

mail($to, $subject, $message, $headers);
echo "mail has been sent";*/

/*$to = $e;
$subject = "Contact Us";
$email = "mail.domain.com";
$message = "hdfhdgf";
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
if($sent) {
print "Your mail was sent successfully";
} else

print "We encountered an error sending your mail";

$from = "mail.domain.com";
$to = $e;
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "ssl://domain.com";
$username = "login";
$password = "xxx";

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp =Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");



It is a verification problem. Are you sure that the username shouldn't be your e-mail address ? If not, ask your system administrator.