Well... I've made some progress:
- When I use port number 587 for smtp.gmail.com, then the email is sent without a problem!!!
- When I use port 465, then is when I get the error.
So it seems it's a security problem.
Maybe gmail does not like self-signed certificates... that could be the issue (although the mail is sent when running the app in other servers like Jetty, with a self-signed certificate).
So how do I add smtp.gmail.com to GlassFish's certificate store?
Thanks a lot.
[Message sent by forum member 'alecaste' (alecaste)]
http://forums.java.net/jive/thread.jspa?messageID=346169