I've completed all configuration items and the application successful connects with a Postgres 9 DB. However in an attempt to register I throw one of two possible email errors.
If I attempt a connection to standard port 25, I see this errror in the catalina.out log:
14-03-2011 17:46:32 UserManagerImpl.register(85): Unable to send confirmation notification
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?. Failed messages: javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at …
If I configure to use our SSL port on our mail server, I receive the following:
15-03-2011 14:39:37 UserManagerImpl.register(85): Unable to send confirmation notification
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. Failed messages: javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at …
which appears to require a cert from the mail server.
I noticed in applicationContextNotification.xml the following line in the mailer bean:
Make sure your applicationContextNotification.xml has ssl and tls settings commented out as they are only required for gmail. The mailer configuration in that file should look like this:
I've completed all configuration items and the application successful connects with a Postgres 9 DB. However in an attempt to register I throw one of two possible email errors.
If I attempt a connection to standard port 25, I see this errror in the catalina.out log:
14-03-2011 17:46:32 UserManagerImpl.register(85): Unable to send confirmation notification
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?. Failed messages: javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at …
If I configure to use our SSL port on our mail server, I receive the following:
15-03-2011 14:39:37 UserManagerImpl.register(85): Unable to send confirmation notification
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. Failed messages: javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at …
which appears to require a cert from the mail server.
I noticed in applicationContextNotification.xml the following line in the mailer bean:
<prop key="mail.smtp.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
Does this class require SSL or is it possible to use an non SSL conenction to the mail server?
Many Thanks.
Make sure your applicationContextNotification.xml has ssl and tls settings commented out as they are only required for gmail. The mailer configuration in that file should look like this:
Thanks! That did the trick.