RocketChat currently does not support the SMTP OAuth, only a basic SMTP auth, which is being deprecated in exchange online (https://techcommunity.microsoft.com/blog/exchange/updated-exchange-online-smtp-auth-basic-authentication-deprecation-timeline/4489835).
Nodemailer has this feature implemented (https://nodemailer.com/smtp/oauth2).
RocketChat currently does not support the SMTP OAuth, only a basic SMTP auth, which is being deprecated in exchange online (https://techcommunity.microsoft.com/blog/exchange/updated-exchange-online-smtp-auth-basic-authentication-deprecation-timeline/4489835).
Nodemailer has this feature implemented (https://nodemailer.com/smtp/oauth2).