I’ve always used contact forms on WP sites and they’ve always worked. However, for the first time yesterday, I had a little problem trying to make it work on a client’s website. I installed Contact Form 7, created a new form and placed the shortcode on the contact page but the thing wouldn’t send any message. I checked the email and crosschecked but still, nothing happened.
I decided to use a different email and that was it, the email was delivered instantly. It was then I realized the contact form wasn’t going to send mails to the custom email set up with Outlook. I searched WP support forum and realized there are lots of people having exactly this sort of problem. Even if you set up the custom email using Google Apps, it’s may still be the same.
Thinking it was a problem with Contact Form 7, I tried using Jetpack contact form but got the same result.
The problem here is that any other email (Gmail, Yahoo, etc) worked fine but whenever the email domain is the same as the website domain, you’re told the message is successfully sent but the message gets lost and not delivered. If you’re facing this sort of problem, there are two possible ways to fix.
1. Using WP Mail SMTP Plugin
Let me make this clear that this fix didn’t work for me though a lot of people claim it works. By installing this plugin, setting it to send all WordPress emails via SMTP may work. I installed the plugin, ran a test and the message was sent alright but it never appeared in my inbox.
However, it’s a fix that worked for a few people and it might work for you.
2. Adjusting Email Routing from cPanel
This can cause some serious problem if done wrongly. When setting up my MX records, I initially set the email routing to be detected automatically. It detected Local Mail Exchanger and this broke the whole thing. Any message sent off site got delivered but any email sent on-site using a contact form simply got lost when it hit the local sever.
It’s best to set your email routing to if you’re using Google Apps or Outlook custom email. This worked perfectly.