We've been using Moodle 3.8 in which we want to send notifications to Users through Emails. For that we have configured Office365 Mailing Server as per Moodle Documentation. But while testing configuration through test mail feature, it returns with an error saying, Your site couldn't communicate with your mail server. Please check your outgoing mail configuration.
Moodle Version - 3.8.3
SMTP Server - Office365
Note:- Website has sub-domain of a registered domain of Organization.
Any help would be appreciated.