6.3.4 mail.imap.ssl.protocols
mail.imap.ssl.protocols specifies the SSL protocols that are enabled for SSL connections.
Description
mail.imap.ssl.protocols specifies the SSL protocols that are enabled for SSL connections. The property value is a blank space-separated list of tokens valid for the javax.net.ssl.SSLSocket.setEnabledProtocols method.
Specifiable values
Type: String
For details, refer to JDK documentation.
Example
Properties properties = new Properties(); properties.setProperty("mail.imap.ssl.protocols", "TLSv1 TLSv1.1"); Session session = Session.getDefaultInstance(properties); Message message = new MimeMessage(session); message.setSubject(sentDate); Transport.send(message);