Re: mail()===false but msg is sent!
| From: | Jasper Bryant-Greene | Date: | Sun, 03 Jul 2005 00:05:04 +0000 |
| Subject: | Re: mail()===false but msg is sent! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218033@lists.php.net to get a copy of this message | ||
Andy Pieters wrote:
So what I do is ( $header="header for multipart mime message"; $body="body with multipart mime message"; $result=mail("Name Firstname <$address>","Subject",$message,$header); echo ($result?"ok":"bogus");Well, firstly your subject does not match what you're doing. PHP is weakly-typed, so $result may be a value that evaluates to FALSE while not actually being a boolean value. In your subject you use the === operator to check types, but you're not doing it in the code sample. You should use echo ($result === false) ? 'bogus' : 'ok'; or similar. Jasper