Issue
- Emails are not sent out from Liferay
- In the log, we see the following error:
liferay[liferay-7] [dxp] ERROR [liferay/mail-6][MailEngine:74] Unable to send message: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [PROD.OUTLOOK.COM"
Environment
- Liferay DXP 7.2+
- Quarterly Releases
Resolution
- This error indicates that there is an authentication issue on Microsoft's side, most probably due to Exchange blocking legacy authentication protocols.
- Microsoft requires OAuth2 and no longer supports basic authentication (i.e. connecting with email address and password).
- For Liferay 7.4 U79+, please follow this article to set up OAuth 2.0 authorization: Configuring Microsoft Office 365 with OAuth
- For previous versions, in order to keep authenticating with the username and password, please refer to the 4 steps listed in the "Error: Authentication unsuccessful" section of this Microsoft article.