E-mails are one of the key elements of a website/web application. They are used in contact forms, sign-ups, notifications, newsletters, etc.
It is a common experience that sometimes e-mails sent from websites go to the junk folders or never reach.
Although it is not always possible to detect the reasons for this, there are several things that we can do to minimize the risk. Here they are:

Send E-mails Through A Valid E-mail Server With Authentication
This is the most important one which you may be automatically offering all the tips below.
It is mostly a good idea to send website e-mails through the e-mail server that will require authentication rather than the web server's SMTP server. Servers that are specifically set to send e-mails generally have Reverse DNS & SPF records, support greylisting ,etc.
Every scripting language offers methods to send e-mails with authentication.
On the other hand, sometimes, using e-mail servers are not enough as you may need to send lots of e-mails but the hosting provider may be applying limits, etc. In such cases, if you'll be sending e-mails through your web server, make sure to check these all:
Reverse DNS (rDNS)
As every domain resolves to an IP address, optionally, IPs can resolve to domain names which is called reverse DNS.
Many spammers use non-existing or dynamic e-mails without reverse DNS records. E-mail servers generally check if the sender IP has a reverse DNS record or not.
How to add reverse DNS records?: reverse resolving uses the pointer DNS record type (PTR record) which you should be asking your hosting provider to create it (check if it exists).
Read the rest of this entry »