I tried 1.6 snapshot. Same problem. The core issue is the system resolves to
use "smtp" instead of "smtps" protocol.

DEBUG: getProvider() returning provider protocol=smtp;
type=javax.mail.Provider$Type@11b5a04;
class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
vendor=Apache Software Foundation;version=1.0

I changed my code to force the use of smtps.

MimeMessage m = new MimeMessage(mailSession);
//Setup recipients etc in MimeMessage...

Transport t = mailSession.getTransport("smtps");
t.connect(mailSession.getProperty("mail.smtps.host"),
mailSession.getProperty("mail.smtps.user"),
mailSession.getProperty("mail.smtps.password"));
t.sendMessage(m, m.getAllRecipients());

Now, the code is failing due to SSL handshake exception:

javax.mail.MessagingException: 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





--
View this message in context: 
http://openejb.979440.n4.nabble.com/Not-loading-smtps-resource-properly-tp4664442p4664449.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to