mail() doesn't work : bug ?

From: Date: Tue, 09 Nov 1999 19:40:45 +0000
Subject: mail() doesn't work : bug ?
Groups: php.version4 
Request: Send a blank email to php-version4+get-6059@lists.php.net to get a copy of this message
Hello, This is weird, the mail() function does not seem to work either with PHP-4.0b2 compiled as a module or with PHP-3.0.12 compiled as CGI. Symptom : I never receive mail although mail() returns 1. Both ini files have sendmail set to /usr/sbin/sendmail -t (I also tried /usr/sbin/sendmail). This is the only sendmail available (NetBSD 1.3.3). Safe-mode is off. 'Mail' works fine from a shell, and I can send mail via a CGI written in sh that calls /usr/sbin/sendmail. Here's the PHP script : <? echo system("ls"); if (mail("cahagn_o@epita.fr", "Subject", "Body")) { echo ok; } else { echo notok; } phpinfo(); ?> The system() and phpinfo() are juste to make sure safe_mode is off and sendmail is set correctly. So, it always returns ok but I never receive mail. I tried to set the header "Return-Path: blabla" but it does not work. Any idea ? How can I debug this ? I guess I know how mail() works as I've been using it on another computer (PHP-4.0B2, Solaris 2.5) for 1 month without any problem. PS: I have a basic PHP compilation (here for the module version): ./configure --with-config-file-path=/etc/httpd/conf \ --with-apache=../apache_1.3.9 -- Olivier Cahagne snina@ambafrance.org olivier.cahagne@epita.fr

« previous php.version4 (#6059) next »