Sending mail from PHP with exim4
6,882
It sounds like you've got different versions of php.ini located under /etc/php5/
debian:/etc/php5# find . | grep php.ini
./cli/php.ini
./apache2/php.ini
Check the [mail function] directive
Author by
jfoucher
Updated on September 17, 2022Comments
-
jfoucher over 1 year
A web server I manage is having problems sending mail from PHP. This server uses exim4 for MTA, and it is configured correctly.
I can send emails from PHP's CLI, but not from the web. i.e. if I do "php mailtest.php" on the command line, the email gets sent correctly, but if I browse to server.com/mailtest.php, mail() returns false and the email never gets sent. Nothing appears in the exim mainlog.
Any advice, or things I should look for ?
Thanks!
-
jgoldschrafe over 13 yearsWhat distro? Are you running in an SELinux-protected configuration?
-
jfoucher over 13 years@jgoldschrafe Debian 5.0.6 and no.
-
Yasiru G about 6 yearsI'm facing the same issue. It seems like permission issue. Have you fix this issue?
-
-
jfoucher over 13 yearsI did, they're the same in both files. I actually copied one to the other (and the other way around) and got the exact same results
-
DrDol over 13 yearsDo a phpinfo() and add the php server information "sendmail" to your question. Exim will normally replace the sendmail binary with the send compartible exim binary.