Sendmail works fine on redhat but PHP unable to use that
Hi, I have problem sending mail with PHP. on LAMP (redhat 7 server). I configured "sendmail" which I am able to send email using the following command:
$ sendmail toemail@something.com <press enter> message body <press enter> ctrl+d (sends message) and the message is received by any mentioned email address, successfully. But when I use PHP scripts (working fine on other servers), PHP scripts are unable to send any email. No error is there in /etc/mail/maillog. and I have tried with different paths in php.ini in sendmail_path e.g: usr/sbin/sendmail -t -i usr/sbin/sendmail -t usr/sbin/sendmail neither of the three does anything. permission for /usr/sbin/sendmail is 666 Please suggest. |
Quote:
What distro and version is this? What's the PHP code? Can you confirm that the PHP code that executes sendmail is actually executed? To be honest, I don't know PHP, but is there any place where an error in a PHP program would be logged? I am asking because a path name without leading slash, like usr/bin/sendmail, is very unlikely to work. EDIT: /etc/mail/maillog is a strange location for a log file. Is it a symbolic link to /var/log? Regarding mail logs, see also http://serverfault.com/questions/596...og-of-sendmail. |
SELinux was enabled
Thanks for the reply. It worked. The reason of it not working was SELinux was enabled.
|
All times are GMT -5. The time now is 01:45 AM. |