Re: Return values?

From: Date: Tue, 26 Feb 2002 04:12:52 +0000
Subject: Re: Return values?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-86188@lists.php.net to get a copy of this message
In article <87y9hhk35q.fsf@server.server>, hh@fsck.dk says... > d@mindbash.com (Daniel alsén) wrote: > > > Hi, > > > > how do i display return values from functions? > > Ie i want to see whether mail() returns TRUE or FALSE. > > echo mail(...); > shows the return value, then you can do: > > if (mail(...)) { > //sent ok > } else { > //not sent > } > > Hmm, in the case of mail that should probably be: if (mail(...)) { //passed that off to the smtp server/mail binary OK: whether it drops // it on the floor who knows } else { //not sent } A true return from mail() doesn't necessarily mean that the mail will actually get anywhere; it just means that mail() has successfully passed it on to whatever process is configured to handle mail. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#86188) next »