tangella_mike Posted February 16, 2009 Posted February 16, 2009 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` Quote
TCH-Alex Posted February 16, 2009 Posted February 16, 2009 This issue has been fixed and you'll be able to sent mails from php scripts. Please try now. Quote
tangella_mike Posted February 16, 2009 Author Posted February 16, 2009 Works for me now. Thanks a lot! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.