Re: [PHP4BETA] mail() doesn't work : bug ?

From: Date: Thu, 11 Nov 1999 19:13:28 +0000
Subject: Re: [PHP4BETA] mail() doesn't work : bug ?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-6139@lists.php.net to get a copy of this message
> > OC> mail() function does not seem to work [...] PHP-4.0b2 [...] > > OC> Symptom : I never receive mail although mail() returns 1. > > > > Some month ago I reported a similar problem on Solaris 2.5.1 (both > > with PHP3 and PHP4 beta 2): > > > > * a combination of several successive system() and mail() commands > > did not worked properly, e.g. only one of two emails was sent; > > > > * mail() returned always 1 even if the mail was not actually sent. > > > > After upgrading PHP4 to CVS version, the first problem seems to be > > gone. The second problem was probably a feature: if PHP4 manages to > > talk to sendmail, it returns success, even if sendmail refuses to pass > > the message further on. > > Thanks but what about the bug (I checked bugs.php.net and this bug has > been reported on August, 25, bug id #2146) with sendmail ? > > Briefly, newer sendmails require that the recipient names be specified > on the command line as well as being in the To: line > > Then everything works fine ; if I just modify php.ini or php3.ini to set > the sendmail_path to : > > "/usr/sbin/sendmail cahagn_o@epita.fr -t" instead of "/usr/sbin/sendmail > -t" > > Then I receive mail via the PHP mail() function. > > Is this being worked on ? (I just checked the PHP3 CVS and PHP4 CVS but > mail.c doesn't seem to be updated to handle this) Define "newer". I am running sendmail 8.9.3, and have no problems with the mail function at all. Are you root (or postmaster) on the box in question? Are you sure this is not a sendmail config problem? PHP returns 1 if it could talk to sendmail. My php.ini string is: sendmail_path = sendmail -t -f webmaster@samaritan.com (I put the -f in there bcz I want all emails to look as tho' they were sent by "webmaster".) Please note that Sun has some very odd things going on in their default config. As for bug #2146: "I saw that the nrcpts value for sendmail was 0 even though I was passing a valid recipient name." I looked in my log files, all of my nrcpts are zero also, but the mails are sent...odd...I am going to do some digging in the bat book during lunch, see if I can see anything.

« previous php.version4 (#6139) next »