Switching from SMTP to oAuth

Due to this: Deprecation of Basic authentication in Exchange Online | Microsoft Learn