Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Nov 2007
    Posts
    47

    Question Problem with PHP mail() and sendmail

    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. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Problem with PHP mail() and sendmail

    What version of PHP are you running?
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  3. #3
    Member
    Join Date
    Nov 2007
    Posts
    47

    Default Re: Problem with PHP mail() and sendmail

    We're running PHP 5.2.16, Apache 2.2 and Cpanel / WHM 11.30.2

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Problem with PHP mail() and sendmail

    Are these websites up to date?
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  5. #5
    Member
    Join Date
    Nov 2007
    Posts
    47

    Default Re: Problem with PHP mail() and sendmail

    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. #6
    Member
    Join Date
    Nov 2007
    Posts
    47

    Default Re: Problem with PHP mail() and sendmail

    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

Similar Threads & Tags
Similar threads

  1. PHP Sendmail
    By jer2eydevil88 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-29-2010, 12:25 PM
  2. PHP Sendmail
    By jer2eydevil88 in forum E-mail Discussions
    Replies: 2
    Last Post: 07-18-2008, 11:45 AM
  3. cant sendmail php files!
    By black.live in forum cPanel and WHM Discussions
    Replies: 13
    Last Post: 01-15-2006, 11:35 PM
  4. PHP Sendmail Problem
    By celliott in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 01-07-2006, 06:16 PM
  5. Looking for file, mail/sendmail.mc and services/sendmail
    By demomen in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-08-2005, 03:22 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube