Search This Blog

Breaking

Tuesday, 8 June 2021

[Resolved] javax.mail.MessagingException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

 If you are using javax mail api for sending, reading mail from your java code and you get stuck with this error while as per your knowledge, all the configuration information is correct, then it might be the issue is with your (corporate) firewall proxy.







Error description: 

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)

at ss.EmailUtility.<init>(EmailUtility.java:79)

at email.main(email.java:8)

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)


That you can resolve with the help of your local network admin.

Meanwhile, to ensure that your code is working fine, what you can do is to bring your code into local machine, where there is no firewall proxy is enabled.

Run your code, and you will see, that there is nothing wrong in your code, it's just the admin setting in your machine which is preventing you to execute the code.


No comments:

Post a Comment