Hey, this is pain when email not working :-(. It’s hard to debug because everyone has their own unique setup. Let’s take a step back to re-structure your problem.
Mail from your website/contact us not going: How do you send out email? do you run send mail on your server? Or do you us a third party service to handle email sending? Or is it a form that somoeone fill it to submit email? Can we have a link to your website so we can look and see?
Hi, thanks for replying. I am using Mailjet to trigger mails from my website. You can visit my website www.waybackcopy.com to check the mail functionality.
The mails were working when https was not active. But stopped now after I activated https on my domain from cloudflare.
Alright, May I know if you have your MX records in DNS. Go to your Cloudflare login and click on the DNS tab. You will find an MX record there if you had them before. The thing is that MX records aren’t proxied through Cloudflare. So an easy solution would be to search the DNS record for your mail. It will be something like mail.yourwebsite.com
Go to this record and edit it to DNS only. I think it will work, lemme know if it does.
I also changed the A record that is named mail in the DNS Tab to DisableProxy status so that is is set to DNS only
Finally, when setting up the email in the Mail app in iOS and macOS, I put the incoming and outgoing mail servers to both be mail.mydomain.com instead of what I had previously which was mydomain.com
The previous way of setting up my mail via mydomain.com was recommended for security by the cPanel mail setup guide and it worked previously, but I could not get it to authenticate properly with Cloudflare
A record - domain.tld - web server ip - orange cloud
A record - mail - mail server ip - grey cloud
CNAME record - www - alias of domain.tld - orange cloud
MX record - mail.domain.tld
If your form is trying to send email using domain.com it won’t work because that is Cloudflare’s IP address which does not have your mail server. You may need to specify mail.domain.com in your form which does point to your mail server’s IP address.
You can ignore the warning about a record exposing your origin server’s IP for things like this IF you’re not bothered about people knowing your servers’s actual IP.
I recommend checking your MX records because your post makes it sound like domain.com is set as the MX which won’t work because that’s Cloudflare’s IP. You’ll need to change your MX records to point to your actual mail server’s IP address.