Have you attempted using port 25? We encountered a similar problem, and email transmission didn't work through port 587. Additionally, please verify that it's not being treated as spam, which could lead to the account being locked out. If your system is sending multiple emails daily, it might trigger spam filters. We faced a similar situation with our BACS system when using Office 365 SMTP servers, and we also added 'ehsaas 8171' to the configuration.