Are Your Members Receiving Your Emails?
I operate a large network of advertising sites and one of the most frustrating thing a marketer can face is getting their emails delivered, whether they are signup confirmation emails or your occasional mailings to stay in touch with your members.
As marketers we all know that a GMail account is the best as far as deliverability is concerned (or so we think). Have you ever checked your spam folder in your GMail account? You’d be surprised how much ends up in there. I have spent much time researching and testing how to get GMail to NOT put my emails into my members’ spam folders.
Here are the steps you need to take:
1) Make sure you have an SPF record for every domain that you send email from. SPF stands for Sender Policy Framework and it’s job is to tell the mail server on the other end that ip address xxx.xxx.xxx.xxx is permitted to send email for domain abc.com. All you need to do to set one up is go into your CPanel, and under Mail click on EMail Authentication. Then where it says SPF click the enable button. That’s it. Now if you send your email through a different server eg a remote server then it gets a little more complicated and I will address that in a future post. (Basically you need to go into WHM and edit the SPF record in the DNS zone and add the ip of the remote server you use to send mail for your domain.)
In order for Google to notice your SPF record send a few test emails from your domain to your own GMail account so Google knows about it.
2) In CPanel under Mail click on Forwarders. Setup two forwarders that forward to a real working email address as follows:
postmaster@yourdomain.com ==> you@yourdomain.com
abuse@yourdomain.com ==> you@yourdomain.com
Some mail servers check for the existence of these email accounts and check that they are able to receive email before they will deliver your email.
3) If you are using a PHP script to send your email then we have to correct another problem. Most PHP scripts by default send email as user nobody. So when GMail gets your email the Return Path looks like this: someacount@server1.domain.com instead of your email address. The result? Gmail sends it straight to the spam folder every time. You need to open up the PHP script that sends the email and look for this line:
mail($contactemail, $Subject, $Message,$headers);
and change it to:
mail($contactemail, $Subject, $Message,$headers,”-fadmin@yourdomain.com”);
(assuming you are sending email as admin@yourdomain.com) and yes, the -f runs right into the email address.
WARNING: Whenever editing a PHP file ALWAYS keep an unmodified backup copy at the ready in case something goes wrong with your edit. And always, always test your edited script to make sure it still works correctly.
GMail makes it pretty easy to troubleshoot email delivery problems. Find an email sent by your site in your own GMail account and open it. In the top right hand corner click the down arrow beside Reply. Then select Show Original. That will open a new window showing you the mail headers. You can check if your SPF record is working because GMail will class it as Pass, Neutral, Soft Fail or Fail. You want it to say Pass. If it says Neutral then Google is not sure and makes a guess. You can also look at the Return Path. If you made the edit to your PHP script is should say admin@yourdomain.com NOT someaccount@server.domain.com
Following these 3 steps should get your emails delivered a lot more reliably especially to GMail. I hope that helps out a few people especially my fellow text ad exchange admins.
Greg Chadwick



