Recently I had an issue where notifications from any form on my server was either being marked as spam or not being received at all by my gmail account. I first contacted Gravity forms support and they advised me to download their logging tool here: Gravity Forms logging tool. However, after installing a setting up the tool I realized from the log that the problem was not Gravity forms, as per the logging form the php_mail function was sending and working properly. Next I contacted media temple to see if my server IP may have been blacklisted by Googles mail servers, but after running my IP through a tool they advised me that it was not blacklisted.
After tons of research I came across something called SPF, or the Sender Policy Framework. Basically, SPF is something that more advanced email servers are using now to detect and eliminate spam. Before it even gets to your spam folder! Luckily there is an easy solution to add an spf record to your domain name. If you’re using a dedicated virtual server from Media Temple, simply add this TXT DNS record to your domain names DNS settings:
v=spf1 a mx ip4:xxx.xxx.xxx.xxx -all
Just make sure to replace xxx.xxx.xxx.xxx with your servers IP address.
Then, when you are setting up your notifications in Gravity Forms, make sure the “from email” is firstname.lastname@example.org. Then set the “reply-to” to the users email, or however you want to set that up.
Thats it! If you want to test your SPF record, you can run a test with the last form on this page.
If you are hosting multiple domain names. You will need to do this for each domain name. If you’re using something other than a DV, see this Media Temple support page.
Special Thanks to Yoast for writing this post on SPF