Office365 email setup

My understanding is SMTP for O365 if being depricated. If it does happen to work for you its only a matter of time before its shut down. (September 2025).

You should explore alternate outbound email like Sendgrid, etc. that support SMTP.