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.

Problem with PHP mail() and sendmail

Discussion in 'E-mail Discussions' started by keddie, Aug 19, 2011.

  1. keddie

    keddie Well-Known Member

    Joined:
    Nov 17, 2007
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    One of my users reported that they weren't receiving webform submissions (using Drupal). When the form was submitted they got this error:

    warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/p*****l/public_html/includes/mail.inc on line 193.
    Unable to send e-mail. Please contact the site administrator if the problem persists.

    I've tested a few other accounts that are using various PHP CMSs (Wordpress, Joomla, etc) and the result is the same:

    Joomla: Wordpress:"Could not instantiate mail function."

    When I SSH in to the user accounts (as the user, not root) and run sendmail from the commandline, it works ok and mail gets sent

    php.ini has the defaults for mail setup:

    sendmail_path = "/usr/sbin/sendmail -t -i"

    There seems to be a problem with sendmail working with PHP and it is serverwide, not confined to a single user / platform.

    Any ideas?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    What version of PHP are you running?
     
  3. keddie

    keddie Well-Known Member

    Joined:
    Nov 17, 2007
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    We're running PHP 5.2.16, Apache 2.2 and Cpanel / WHM 11.30.2
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Are these websites up to date?
     
  5. keddie

    keddie Well-Known Member

    Joined:
    Nov 17, 2007
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    They are all on recent versions of Drupal (6.22) / Wordpress. The Joomla sites are a bit lagged.

    There have been no config changes to this system other than nightly cpanel updates to the stable branch.
     
  6. keddie

    keddie Well-Known Member

    Joined:
    Nov 17, 2007
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Apparantly there was a conflict between some Apache RPMs and the source built by easy apache.

    Cpanel support identified this and did a rebuild of Apache / PHP and the issue is resolved.

    The Cpanel support team made my day :)
     
Loading...

Share This Page