How To Fix: WordPress Mail Not Sending To Email on Same Domain
Issue:
Mail sent through WordPress (using forms) won’t send to email accounts using the same domain as the web site. This problem does not likely exist if you are using your host’s mail server. However, if you are using an external mail server where you have set the mail DNS to point to Office 365 or some other mail server, then this problem will likely apply to you (as in my case, my clients are using GoDaddy hosting but their mail server is Office 365).
I have several clients who use external mail servers /email addresses set up by their IT people. Their web sites are both on the WordPress platform on GoDaddy hosting. Using Contact Form 7, form mail would NOT deliver to anyone in-house using an email address on the same domain as the web site. Mail would, however, successfully send to recipients if their email was not using the same domain as the web site. This was a real head scratcher because everything was set right on the forms and on the DNS records for the mail server. So here’s the trick! The IT guy for one of my clients discovered that the MX records for the hosting should be changed in the cPanel. Since both clients use external mail and their DNS for mail is pointing away from the host, I would have thought the mail was using that external server. Well, apparently, the forms on the web site need to be told what to do with themselves via the hosting cPanel. Since my 2 clients with this issue both use GoDaddy hosting, my screenshot below is from GoDaddy’s cPanel. This probably works on other hosts too.
Solution:
- Open GoDaddy cPanel and scroll down to the Email Section.
- Click on “Email Routing”
- Change the setting for “Configure Email Routing” to “Remote Mail Exchanger”
- Click the blue “Change” button.
- Now test your form and see if your client now receives the form mail at their inbox.
For both of my clients with this issue, changing the email routing to “Remote Mail Exchanger” on GoDaddy’s hosting cPanel fixed the mail issues immediately. Now both clients successfully receive the form mail sent through WordPress.
Caveat:
Note: This is not the same issue that Contact Form 7 always reminds you of – where you should use an email address of the same domain the web site is on for the FROM field on your forms. It’s a related issue but is not the solution to the problem above. The FROM field should be an email address of the same domain as the web site AND you should also set the “Email Routing” in the hosting cPanel to use “Remote Mail Exchanger” if using an external mail server (meaning you are not using email accounts within the hosting plan and instead have pointed the mail records in the DNS away from the hosting plan).
Nath Wijayagunasekara
Hi,
This is the only article in the whole of internet that addresses this specific issue! You saved my life after struggling with this issue for more than 2 weeks, As you said this “was a real head scratcher”.
Thanks heaps for this great article that describes the issue and solution very clearly.
In my case the hosting provider migrated the sites and did not do the relay change, know how the DNS was already setup and their support is still scratching their heads!
Thanks again!
Nath
Web Image Media
Thank you so much Nath! Glad it worked for you. It was a real revelation for me to figure out that forms on the web site don’t use the DNS MX records and instead, you have to go into the cPanel to tell forms on your web site how to send mail! And you bring up a great point… even if you have this set once, if the host migrates your site, you may have to reset the “remote mail exchanger” if your forms suddenly stop working properly.
Bill
I am having this exact issue and I got to the Change Email Routing in GoDaddy thinking that was the solution but I am not sure that I have the MX record correct. Like you, the email is hosted on Office 365 and the website is running on a GoDaddy hosted site. So, I have to ask what do you mean by “meaning you are not using email accounts within the hosting plan and instead have pointed the mail records in the DNS away from the hosting plan”? We are not using local email accounts other that to send email via the GoDaddy SMTP server. I am just not certain how the MX record in the GoDaddy DNS Zone should be set? Can you provide any info on where I can get the proper settings?
Web Image Media
Hi Bill, your DNS for the domain name (in GoDaddy’s DNS settings for the domain) should be set according to the email program you are using – this solution does not make any changes in the DNS for the domain. The only change you will make in reference to this solution is in the HOSTING section (by clicking on “My Products” and then opening the hosting plan you have and then open the cPanel) – then under “Email Routing” in the GoDaddy cPanel, change it to “Remote Mail Exchanger” – only IF your client uses email that does not come with the hosting plan – meaning you did not set up any email accounts inside the hosting cPanel. Since you said you are using Office 365, this solution would apply to you. Hope that helps. Let me know if you have further questions!
Steph Jenkins
Hi! I have been wrestling with this issue for over a year. After trying a million things (dont even get me started), I found this article! We host with bluehost, but use Office 3565 with GoDaddy. Are you able to provide how to do this with my setup?
(We were only ever able to get our website form emails to deliver to gmail)
Thanks in advance.
Web Image Media
Hi Steph, If you are using Office 365, regardless of where you purchased it, it’s not part of the hosting plan and is therefore using a foreign mail record to send mail (foreign to the hosting). Therefore, this solution should apply to you. As Justin points out in the comments, a very similar solution worked for him on Bluehost. Try opening the cPanel in your Bluehost account and under “MX Mail Exchanger,” change that to “Remote Mail Exchanger.” Let me know if that helps!
Justin
Thanks so much for writing about how you resolved this! I managed to get this to work in Bluehost under my DNS settings, under MX mail exchanger, and changing it to remote mail exchanger.
Web Image Media
Awesome! Thank you so much for sharing your experience with Bluehost! Sounds like the solution is very similar.