Office 365 SMTP Configuration throws 'Unrecognized SSL message' error and fails in Crowd
問題
Attempting to configuring a SMTP connection in Crowd to Office 365 fails.
The following appears in the Crowd logs:
java.lang.RuntimeException: Could not send email to <email-address>: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
原因
The built in SMTP configuration screen for Crowd does not work with Office 365.
回避策
- Stop Crowd
- Move
activation-1.1.1.jar
from<crowd-install>/crowd-webapp/WEB-INF/lib
to<crowd-install>/apache-tomcat/lib
Add the following to
<crowd-install>/apache-tomcat/conf/Catalina/localhost/crowd.xml
before the </Context>:<Resource name="mail/Office365" auth="Container" type="javax.mail.Session" mail.smtp.host="smtp.office365.com" mail.smtp.port="587" mail.smtp.auth="true" mail.smtp.user="yourEmailAddress@yourOffice365.com" password="yourPassword" mail.smtp.starttls.enable="true" mail.transport.protocol="smtps" />
- Start Crowd
- Configure the SMTP mail server to use the JNDI location of
java:comp/env/mail/Office365
- Save and send a test email
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.