javax.net.ssl.sslhandshakeexception: no approve protocol error resolution
1. Problem descriptionA simple email sending program is developed in Java. The local operation is normal, but an error occurs when it is uploaded to the server
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
2. Problem solving
1. Find the JDK directory/JRE/lib/security/java.security, remove SSLv3, tlsv1 and tlsv1.1 in jdk.tls.disabledalgorithm.
2. You need to execute the following commands to finally solve the error report. Refer to https://stackoverflow.com/questions/38205947/sslhandshakeexception-no-appropriate-protocol#
update-crypto-policies --set LEGACY
Similar Posts:
- JavaMail uses 163 mailbox to report 535 error: authentication failed
- javax.mail.MessagingException: Could not convert socket to TLS
- [Solved] Python Error: CentOS failed to send mail without any error message
- Phpmailer’s solution to extension missing: OpenSSL error
- [Solved] javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- [773]smtplib.SMTPServerDisconnected: Connection unexpectedly closed
- Troubleshooting of JavaMail “535.7.3 authentication unsuccessful”
- Error reported when Foxmail software adds QQ email
- [Solved] smtplib Sent Email Error: SMTPDataError: (554, ‘DT:SPM 163 smtp1
- [mailbox usage] POP3, SMTP activation and setting method of Yahoo mailbox