Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP mail() function failing silently

Discussion in 'E-mail Discussion' started by MrChook, Jan 10, 2009.

  1. MrChook

    MrChook Registered

    Joined:
    Sep 21, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    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...

    Code:
    $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.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice