Thursday, 19 January 2017

Wordpress Contact Form 7 emails won't send to Office 365 [Solved]

I got a job to set up a new business website for a client. The job involved setting up a brand new Wordpress website on a new host and not on the old host they were currently with. Their domain names and email were also registered at the old host too but would not be moved.

So, the new Wordpress website went up without a hitch but I ran into a problem where a form on the contact page that was using the Contact Form 7 plugin wouldn't send emails to any '' email address, it would however send emails to any other address (eg., etc) as long as it didn't use the

To resolve this I contacted my hosting support and they instructed me to go into cPanel, go to Email and select MX Entry.

Then select the '' and make sure Email Routing was set to 'Remote Mail Exchanger'.

Unfortunately this alone did not fully solve my problem.

It wasn't until further investigation on the DNS Zone settings for the domain name at the old host that I discovered they were using Office 365 for their email and not the built in host email service I had assumed.

I discovered this because of  three DNS Zone records that looked like this:

v=spf1 -all

I then went into the cPanel on the old host and checked the Email MX Entry for the domain, which looked like this:

So I copied this and went back to the Email MX Entry on the new host. I selected the 'companydomainname' and then removed the '' under the MX Records section.

I then inserted into the destination box under the 'Add New Record' heading and clicked 'Add New Record'

The then appears in the MX Records section

After this the form on my website would correctly send emails to any email address.

Hope this helps someone out.

This link was also useful


  1. How long did it take your DNS to repopulate?

  2. Hi, Did you have to do both changes? Set 'Remote Mail Exchanger' and add the MX record

    I have the same issue on a company website so don't want to break their incoming mail

    1. Yep, exactly as I have it written above, it shouldn't break their incoming mail as you are not configuring any settings on their actual incoming mail server.

  3. I have the exact same situation as described here. however my contact 7 form won't send emails even if they are going to a different address. I'm using hostgator and the client is using office 365. I made the changes you suggested but nothing...even an hour later. I'm at a loss at this point.

  4. Never could get this to work. I had to install an SMTP plugin.

  5. Thank you! You helped me so much... I have been searching for a fix for 3 days now!!! This worked... My website host had installed a plugin "WP Mail SMTP" which I had to disable... No one could fix our issue... until I came across your post xxx

    1. Yep took me a while too, glad it helped you out

  6. 10+ hours of troubleshooting Contact Form 7 (myself),
    2 Upwork freelancers who were supposed to make the form work,
    3 hours on the phone with Godaddy....
    and it turns out that all I needed was this
    1 article.
    Thank you for sharing. You are a godsend. Seriously. THANK YOU for this!!!

    1. No problem, glad it saved you some hair loss