Posted: Mon Jun 12, 2006 6:33 pm
First bit of advice, don't use short PHP tags (<? and ?>). Take the extra time to write out <?php. There was a recent post from a user who was stung by this because of an upgrade to a newer version of PHP in which it was off. Don't screw yourself early on with bad practices.
Second, make sure your host supports the mail function. Some hosts, like GoDaddy, disable the feature on certain accounts (like GoDaddy does on Windows servers running PHP).
Next, understand how mail works. The PHP Manual mail() page is a good place to start when it comes to learning what the mail function does and what it returns. Just because you are getting a succeful return doesn't mean that the message was sent. It only means that the mail was accepted for delivery.
Second, make sure your host supports the mail function. Some hosts, like GoDaddy, disable the feature on certain accounts (like GoDaddy does on Windows servers running PHP).
Next, understand how mail works. The PHP Manual mail() page is a good place to start when it comes to learning what the mail function does and what it returns. Just because you are getting a succeful return doesn't mean that the message was sent. It only means that the mail was accepted for delivery.
The PHP Manual wrote: (taken from the mail() function page)
Return Values
Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.
It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.