If you installed Cloudflare and Outlook stopped working, you are not alone. I had the same problem with Outlook breaking sending emails after I installed Cloudflare. There are a ton of threads out there about this, but so many of them go nowhere that I decided to write about the solution to fix Outlook after setting up Cloudflare.
Cloudflare and Outlook
I have, unfortunately, for quite a while now, been resistant to the idea of using Cloudflare on any of my domains, despite Cloudflare being free, and speed being an important part of publishing a website. I tried all sorts of things to make faster websites, but I did not use Cloudflare. However, I finally bit the bullet and decided to install Cloudflare on several of my domains. The process went surprisingly smoothly despite a few Cloudflare bugs with Microsoft Outlook, and a couple more with one of my webhosts.
First, you want to be sure the problem is Outlook not working with Cloudflare, and not your email not working with Cloudflare. Those are two very different things. If your email is working with Cloudflare but not with Outlook only, then this is the solution. You can test if your email is working fine with other clients by using your host-provided webmail account or using a different email client. For example, my email worked find before Cloudflare on my PC-based Outlook, and on my iPhone mail client. After setting up Cloudflare Outlook stopped working, and on a problem with Outlook. My iPhone and webmail still worked just fine.
There is a video that appears to be posted by a bot on many Cloudflare community forums that sort-of helps.
Cloudflare and Outlook Working Email Setup
When you set up Cloudflare it copies your DNS records from your current DNS provider. This is good. However, the mail records that worked over there might not work on Cloudflare.
The two most important records are the MX record and the A record for mail. Your former DNS provider may have used something different, so it is important to fix Cloudflare settings for Outlook.
First off, your Outlook settings have the server set as mail.<hostname>.com, then need to have an MX record named <hostname>.com and it should be set to mail.<hostname>.com
Then, you need an A record of mail, and it needs to point to your host’s sever IP address just like all your other records do. Now, here is the trick. That A record must be unproxied (orange cloud off) or it won’t work. Cloudflare does not proxy email so if you have proxy on (orange cloud on) then your email will not work.
This is the relevant bit of information from Cloudflare:
You need Cloudflare Spectrum, which is not part of the free service, to actually proxy email traffic. If you are using the free Cloudflare version like most of the people I know, then you need to set your email records to be unproxied (no orange cloud) easy-peasy.
This setup generates some warnings in Cloudflare DNS settings that this record exposes the IP address behind it. – What does exposes the IP address behind it mean?
If someone were to attack your site with a DOS attack, they can find your real IP address, and attack it, instead of Cloudflare which can defend your site against DOS and other traffic attacks by handling the income wave of traffic.
Does it matter if the IP address is exposed?
That depends, will your website be attacked? For most people the answer is no, but if your site provides significant income, it might be time to get off the free versions and pay for more service.