I want to resurrect this thread to submit important update. The error "PKIX
path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target" has been tracked down to
anti-virus software running (Avast in my case).

I came across the SO posting
http://stackoverflow.com/questions/20039347/get-java-error-when-sending-emails-via-amazon-ses.
Then, I turned off my virus checker. Everything worked flawlessly. As soon
as virus checker comes on, the problem appears again.

This is true, even if TomEE is running inside of a VM and the virus checker
is running in the host.

Since my original post, I have switched to Amazon SES to send email instead
of Gmail. My settings are as follows. I suspect they will be very similar if
I was using Gmail:

<Resource id="mail/Default" type="javax.mail.Session">
        mail.transport.protocol=smtp
        mail.smtp.host=email-smtp.us-east-1.amazonaws.com
        mail.smtp.port=587
        mail.smtp.auth=true
        mail.smtp.user=SES_SMTP_USERNAME
        mail.smtp.password=SES_SMTP_PASSWORD
        mail.smtp.starttls.enable=true
        mail.smtp.starttls.required=true
        user=SES_SMTP_USERNAME
        password=SES_SMTP_PASSWORD
</Resource>

Note, the user name and password had to be entered twice.



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

Reply via email to