In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > [EMAIL PROTECTED] (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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php