Re: why is this not a bug?

From: Date: Thu, 13 Jul 2000 12:51:39 +0000
Subject: Re: why is this not a bug?
Groups: php.general 
Request: Send a blank email to php-general+get-6424@lists.php.net to get a copy of this message
====== Forwarded Message ====== Date: 7/13/00 8:50 AM From: omnivore@sympatico.ca (Dan Donaldson) To: rasmus@php.net (Rasmus Lerdorf) On 7/12/00 at 11:33 PM, rasmus@php.net (Rasmus Lerdorf) m'a dit: > > From ext/standard/mail.c: > > sendmail = popen(sendmail_path, "w"); > > if (sendmail) { > fprintf(sendmail, "To: %s\n", to); > fprintf(sendmail, "Subject: %s\n", subject); > if (headers != NULL) { > fprintf(sendmail, "%s\n", headers); > } > fprintf(sendmail, "\n%s\n", message); > ret = pclose(sendmail); > if (ret == -1) { > return 0; > } else { > return 1; > } > } else { > php_error(E_WARNING, "Could not execute mail delivery program"); > return 0; > } a followup here: if I try popen /usr/sbin/sendmail from the shell, sendmail responds with 'recipients must be specified' so it is responding... If I try popen /usr/nothing -w it returns open[4501] No such file: /usr/nothing so everything would appear to be ok, it's acting appropriately. Is there a way I can do more of this from the command line? It appears to me from what is shown above that php must be interpreting anything returned from the OS as a confirmation of the existence of the path after popen...so sendmail won't generate the error in the else statement for if(sendmail). - and perhaps that is the source of my woes? Does php have to be configured with some kind of 'with sendmail' directive as it does with apache and mysql? Forgive my ignorance but could this be the problem? dan Dan Donaldson omnivore@sympatico.ca ====== End Forwarded Message ====== ----------------------------------------------------- omnivore: omnivore@sympatico.ca Networked and Desktop interactive technologies tel: +1 416 603 3309 Build surveys online with surveys123: http://www.surveys123.com Your Online Science & Astronomy Superstore: http://www.e-sci.com

« previous php.general (#6424) next »