Cloudflare's orange cloud only works for web traffic. If a record that email depends on is proxied, mail can stop working.
Steps
- Open your domain's DNS page in Cloudflare.
- Find the record your
MXpoints to. It is usuallymail, anArecord. - Click it and set the proxy status to DNS only (grey cloud).
- Do the same for
smtp,imapandpoprecords if you have them. - Keep your SPF, DKIM and DMARC
TXTrecords in place (Setting up SPF, DKIM and DMARC so your email is trusted).
The MX record itself cannot be proxied, so you only need to check the A records it relies on.
If it doesn't work
- Run
nslookup mail.yourdomain.comor use an online DNS checker. It must show your hosting server's address, not a Cloudflare one. - Changes can take a little while to reach everyone. Send a test message after about 15 minutes.
- Use Email Deliverability in cPanel to see what it expects to find in DNS.