PHP not sending emails, no errors in logs

1.5k Views Asked by At

I've got an Ubuntu server set up with PHP 5.2, apache and sendmail. I've got some Drupal sites that should be sending emails but are not. I don't see any errors in the apache logs and there appears to be nothing in /var/log/mail.log. What do I need to do to debug this?

1

There are 1 best solutions below

0
K. Norbert On BEST ANSWER

By default the config section related to sendmail is commented out in the php.ini file.

Look for:

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = [email protected]

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =

In your php.ini file. Note that there could be more than one php.ini file, for example for the CLI php, and one for the Apache module.