Unable to connect to O365 Mail Server

It’s a problem with the certificate of the mail server. Did you try the option STARTTLS for encryption (Basic mail settings for 0365)