"php mail() works from command line but not apache" Answer’s

0

I found the problem. SELinux was preventing apache from being able to use sendmail. To diagnose, I used

$ sestatus -b | grep sendmail  
httpd_can_sendmail                   off

Then to actually fix the problem:

$ restorecon /usr/sbin/sendmail
$ setsebool -P httpd_can_sendmail 1

Read more about it here.

Wednesday, March 31, 2021
 
revive
answered 11 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 
Share