This article describes common errors with SMTP for Office365.
To set up custom SMTP, please refer to this article.
Fixing common authentication errors:
Error:
Invalid login: 451 4.7.0 Temporary server error. Please try again later. PRX4
or
535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator
Useful Articles/Questions:
Office365: Temporary server error. Please try again later. PRX4 | Blog | Limilabs
Fixing error-authentication-unsuccessful error
https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/fix-issues-with-printers-scanners-and-lob-applications-that-send-email-using-off#error-authentication-unsuccessful
Solution:
Customers need to enable SMTP Authentication for an account that’s used for sending emails
Enable or disable SMTP AUTH in Exchange Online