Get SSL version from smtp server in Javamail
I recently upgraded to new JavaMail 1.4 and i can't connect to smtp.gmail.com
over ssl.
This line works before javamail upgrade:
props.put("mail.smtp.ssl.protocols", "ssl");
Now it need to look like this:
p开发者_开发知识库rops.put("mail.smtp.ssl.protocols", "sslv3");
or
props.put("mail.smtp.ssl.protocols", "tlsv1");
This doesn't work:
props.put("mail.smtp.ssl.protocols", "tls");
My question is:
- Why previous version could work?
- How to get SSL version from server so i could switch to it properly?
Just leave it out. Java will figure it out.
Those protocol names should be in uppercase as far as I know,
精彩评论