Not receiving your mail? Here are a few common problems to check when working with the mail ()
- Does your account have SPAM filters?
If it does, check your junk mail folder (or trash, or whatever your particular program calls it.) It may have been received and filtered out. Fortunately most programs allow you to add it to a list of safe senders so it won't be filtered out in the future.
- Are you sending to a legal address?
Depending on how your host has things configured, sometimes you can't send a form mail to yourself@THISaddress.com if your form is on www.THATaddress.com. You may need to setup an email that corresponds to the site you are sending from, or see if your host allows you to add your other email address as an allowed recipient. Since all hosts are different, the best thing you can do is contact them.
- Do you need authentication?
When you send email from your mail program, do you need to provide a password for outgoing mail (outgoing mail authentication?). If you are unsure because you set up your mail a long time ago, the best thing to do is ask your host. If you do need outgoing authentication, the mail () function won't work. Fortunately, there are still ways to send mail from your website with PHP.