mattgadient.com

contact form on a WordPress site not sending email

So it happened again. I’d recently moved my sites to another host, decided to put a “Fast Secure Contact Form” on the WordPress site, went to test it, and…

No email.

I mean, it looked like it sent (no errors), but I wasn’t receiving anything. I started the troubleshooting process by adding the site’s IP address to the SPF tags for the domain, just in case Google Mail wasn’t thrilled that another server was claiming to be me.

No dice.

 

Finally, I remembered that I was in a similar pickle a few years ago with a contact form on a Joomla site. Again, just after I’d switched to a new domain. Low and behold it was the same issue. The mail for the domain (MX record) was set to use Google’s servers. But the server the website is on didn’t know that – when the contact form on mywebsite.com tries sending email to admin@mywebsite.com, the server assumes it should just send to itself.

Here’s the image I worked extremely hard on back in 2009 to help clarify:

web-server-dns-email-process-google-apps

Just as before, the fix was to edit the MX entries on the server (right from within cPanel) to point them to Google’s mail servers.

If you’re using Google Apps for Domains to handle your mail and aren’t getting email from your Contact Form plugins (or from WordPress when people leave a comment for that matter), that’s probably where your issue is (and what your fix is) too.