Re: [SOLVED]mail command failing
| From: | Mike Wright | Date: | Tue, 29 Jun 2010 18:18:02 +0000 |
| Subject: | Re: [SOLVED]mail command failing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306529@lists.php.net to get a copy of this message | ||
Mike Wright wrote:
Hi all, I'm very puzzled by this. I've been using the php mail command for years but now I can't get it to work and can't figure out how to diagnose the problem. I can access the mail server with "/usr/bin/mailx" and by telnet "localhost 25". I can also send mail using php by using 'exec (" echo $body | mailx -s $subject $recipient")'. php-5.2.29 on fedora10 with apache 2.2.14. Can this be selinux related?I'm using Zend Server Community Edition. Apparently it is launched pointing to a different php.ini (/usr/local/zend/etc/php.ini) and the libphp5.so is compiled WITHOUT a sendmail path. Even though I used "ini_set('sendmail_path', '/usr/sbin/sendmail')" in the program it apparently had no effect. Only after setting the path in Zend Server CE's php.ini would the mail command work. Zend claims it is not a bug stating, "even though the traditional path is /usr/sbin/sendmail one cannot always be certain that is true for all distributions". 10 days on this and miles behind schedule...