Pages

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 'whoever @companydomainname.com' email address, it would however send emails to any other address (eg. whoever@yahoo.co.uk, whoever@hotmail.com etc) as long as it didn't using the @companydomainname.com.

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 'companydomainname.com' 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 include:spf.protection.outlook.co m -all

autodiscover.outlook.com

clientconfig.microsoftonline-p.net


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

companydomainname-com.mail.protection.outlook.com

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



I then inserted companydomainname-com.mail.protection.outlook.com into the destination box under the 'Add New Record' heading and clicked 'Add New Record'


The companydomainname-com.mail.protection.outlook.com then appears in the MX Records section



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

Hope this helps someone out.

This link was also useful






No comments:

Post a Comment