Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

PHP mail() function stopped working


Recommended Posts

I have been hosting my osCommerce web site with Lunarpages for years now. Great service! A couple of days ago (maybe week or 2) my osCommerce shopping cart stopped sending all order pending, processing, and all other emails. It does not send any Emails any more. I have not changed anything for months. After spending many hours trying to find a solution, I found this test php script:

$TO_ADDR = "target@email.com";		 // target email address
$FROM_ADDR = "my@email.com";	  // my email address
$MESG = "From: $FROM_ADDR\r\n";
$MESG .= "\r\n";
$MESG .= "This is a test\r\n";
if (mail($TO_ADDR,"Testing",$MESG,"From: $FROM_ADDR"))
echo "Mail function succeeded<br/>";
else {
echo "Mail function FAILED<br />";


After replacing target and my@email.com with correct email addresses, this script keeps on failing.


I also noticed that at the same time I could not send mails from Outlook any more. I easily fixed this be checking the "My server required authentication box". I suspect Lunarpages have changed something in their server to prevent hack attacks via this function. Any help would be much appreciated!

Link to comment
Share on other sites


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

  • Create New...