The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php mail() not working

Discussion in 'E-mail Discussions' started by MichaelShanks, May 23, 2006.

  1. MichaelShanks

    MichaelShanks Well-Known Member
    PartnerNOC

    Joined:
    Aug 20, 2001
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    one server php mail() function isn't working,

    i've tried everything fromr ecompiling apache to reinstalling exim, there is no phpsuexec or smtp tweaks yet it still fails to send, it sends fine when run via the cli,

    any ideas?
     
  2. strikeholdings

    Joined:
    Aug 25, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Don't know if this is much help, but...

    Look for errors:
    - /var/log/maillog
    - /usr/local/apache/logs/error
    - Displayed or logged PHP errors

    In particular, do 'tail -f' on a log file, then run the script with mail(), and see if you catch the problem.

    If I read this right, you have a PHP script with mail() in it that works when you run it on the command line but not in a browser? That sounds like a problem with Apache and/or permissions for the Apache user (nobody)?
     
  3. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    make sure that you've configured php properly to send mail, and that the sendmail binary actually exists, and has the proper permissions on it :)
     
Loading...

Share This Page