In Exchange online, the main method of authentication to mail servers is now Oauth 2.0. (Authenticate an IMAP, POP or SMTP connection using OAuth - Microsoft Docs)
They have began to phase out all Basic authentication (see End of support for Basic Authentication access to Exchange Online API’s for Office 365 customers - Microsoft 365 Developer Blog) except for SMTP for the time being:
Please note this change does not affect SMTP AUTH and we will continue to support Basic Authentication for it in Exchange Online at this time. With the large number of solutions, devices, and appliances that use SMTP for sending mail we are working on ways to further secure SMTP AUTH and will continue to update you as we make progress.
Suggesting that we should look into adding mail server Oauth 2.0 support for authentication.