I'm sure this is a simple one. I cannot get PHP to send email. I get this error:
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
xxx@xxx.net
Gid 99 is not permitted to relay mail, or has directly called /usr/sbin/exim instead of /usr/sbin/sendmail.
Here is the PHP script:
<?php
$myname = "Dude";
$myemail = "xxx@****";
$contactname = "You";
$contactemail = "xxx@xxx.net";
$subject = "Test msg from php script";
$message .= "Test message\n";
$headers = "From: $myname <$myemail>\r\n";
$headers .= "Reply-To: $myname <$myemail>\r\n";
//$headers .= "To: $contactname <$contactemail>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: PHP test Mailer\n";
mail($contactemail, $subject, $message, $headers,"-xxx@xxxxx.com");
?>
What am I doing wrong?
Thanks!
Mike`