Problem with PHP mail() and sendmail

keddie

Well-Known Member
Nov 17, 2007
50
0
56
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?
 

keddie

Well-Known Member
Nov 17, 2007
50
0
56
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.
 

keddie

Well-Known Member
Nov 17, 2007
50
0
56
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 :)