Could not convert socket to TLS

Hi am trying to configure email from a realm in keycloak .
Got following exception. when trying to send email.

Kindly help me to fix the below issue .

The server selected protocol version TLS11 is not accepted by client preferences [TLS12, SSL20Hello]
Caused by: javax.mail.MessagingException: Could not convert socket to TLS;
javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS11 is not accepted by client preferences [TLS12, SSL20Hello]
com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2140) com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:734)
at javax.mail.Service.connect(Service.java:342)
at javax.mail.Service.connect(Service.java:222)
at javax.mail.Service.connect(Service.java:243)
org.keycloak.email.DefaultEmailSenderProvider.send(DefaultEmailSenderProvider.java:145)

Caused by: javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS11 is not accepted by client preferences [TLS12, SSL20Hello]

Your email server is trying to use TLS 1.1, but your Java version/configuration doesn’t allow to use TLS 1.1. Only TLS 1.2 - that is a secure option.

So the best option is to ask your email provider to support also TLS 1.2 on their servers.
Less secure option will be to allow also TLS 1.1 in your java (for example in java.security file).