OAuth with Office365 - SMTP Error

I have authorized my office email to be linked with ERPNext.
I receive emails in the communications app.

But I can not send them. Especially, when I try to save the mailbox as the default sending mailbox, I get the following error:
Please check your email login credentials. smtplib.SMTPAuthenticationError: (451, b’4.7.0 Temporary server error. Please try again later. PRX5 [PR1P264CA0152.FRAP264.PROD.OUTLOOK.COM 2024-04-24T14:10:40.106Z 08DC5FD3FB683F98]')

Not sure how to fix this, any advise?

Thank you in advance.

Hi,
Check the Exchange admin center whether SMTP is enabled or not.

If not kindly enable and wait for a few minutes to reflect the changes then try to set it as the default sending mailbox.

Best.

Hi, thank you for your quick reply.
The specific account has SMTP enabled and in the Exchange Admin the SMTP is also enableds.

Hi giebraltar,
Could you please let me know if your issue got resolved as I am also facing the same.

Thanks & Regards,
Balram Singh

Check your port and SSL/TLS settings are correct.

I use an Office365 account, via mimecast, to send system generated emails. It has TLS enabled on port 587.

Thks will check.