PHP mail() function failing silently


Sep 21, 2004
This has been a problem for a while, I'm not sure exactly how long.

The mail() function in PHP is just failing silently. The function returns true as if it had worked but nothing ever shows in the exim log. Seems to be a server wide problem, not just restricted to certain accounts.

All settings look normal,
  • WHM 10.8.0 cPanel 10.9.0-S119
  • CentOS 4.4 i686 - WHM X v3.1.0
  • Prevent the user "nobody" from sending out mail to remote addresses is NOT checked
  • Apache is not configured with PHP suexec but the suEXEC module is enabled.
  • The sendmail path in php is "/usr/sbin/sendmail -t -i" which is correct

I have written a test script that basically runs this...

$result = mail($to, $subject, $content, 'From: ' . $from);
It always returns true and never actually works. Running the equivalent from the command line as any normal user does work so it seems to be some issue with Apache being able to run sendmail.

Any ideas on what this might be would be appreciated.