I am trying to read mails with my JAR file. I am running this jar inside a container. When running I face the below exception.
javax.mail.MessagingException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate);
nested exception is:
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:670)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
What may be the reason for this exception? Do I need to expose any port in container? (I already exposed port 587). Is there a way to check if the mail server is reachable from the container?