Office 365 email

We have a domain hosted on A2Hosting, our email are hosted on Microsoft servers and the domain is routed through Cloudflare.
We have an email account [email protected] which we use to send emails from our website. On our local website we can login and send emails using this email address but on our hosted website we can’t login. We have tried a lot of other email address with the same domain and the result is the same. If we use another domain that is not routed through Cloudflare for example [email protected] we can login and send mails. Did anybody else had this problem and if yes how did you manage to fix it.

Thank you in advance