Re: Getting mail() to return false/0
| From: | Travis Conway | Date: | Wed, 15 Dec 2004 02:53:37 +0000 |
| Subject: | Re: Getting mail() to return false/0 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-204377@lists.php.net to get a copy of this message | ||
----- Original Message ----- From: "Paul Reinheimer" <preinheimer@gmail.com>
Hi, I was working with the mail function today to experiment with sending a few messages, and threw in the apropriate checks so when mail() can't send the message the apropriate errors were raised, however, I discovered I couldn't actually get mail() to return 0. Take the following call: mail("dude", "Daily Feed Update", "body");I assume "dude" is a local user you are mailing to? Make sure you also give a FROM address. Try this: mail("dude@domain.com", "Daily Feed Update", "body", "From: me@mydomain.com") -Trav
When I run that exact call (well, I prepend echo, but you get the idea) it returns 1. I can't for the life of me understand why my MTA would accept an email with a destination of 'dude'. Any thoughts? paul -- Paul Reinheimer