SMTP email account test connection failed with error "Cannot connect to SMTP server: smtp.office365.com, as: , message: failed to connect"Issue When configuring an SMTP email account with Microsoft Office365 using OAuth2.0, after authorizing the email account and performing the test connection, you might encounter the following error: "Error: Connection Failed. Email sender connection invalid. Cannot connect to SMTP server: smtp.office365.com, as: <M365 Email as configured in the 'User name' field>, message: failed to connect." Although you can successfully authorize the email account and retrieve the refresh token and access token using the authorization code grant type, this error occurs when performing the test connection.ResolutionEnable Authenticated Client SMTP Submission:-->Enable the authenticated client SMTP submission (SMTP Auth) in Exchange Online for the email account you are setting up. -->This action requires intervention from customer's outlook Mail Admin/Exchange admin team. Reconfigure the Email Account: -->Once SMTP Auth is enabled, set up the email account again. Verify Operation: -->Check the email diagnostics to ensure everything is operational. -->Perform test connections to verify successful configuration. -->Monitor the email logs to confirm that emails are being sent successfully.