У меня проблема с отправкой электронной почты с помощью Java. Мы использовали GMail около четырех лет для отправки почты с помощью нашего программного обеспечения Java. Теперь я получаю следующую ошибку:
Exception in thread "main" java.lang.RuntimeException: javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at SendEmail.sendMissingMailWeek(SendEmail.java:233)
at main.negVerkaeufeMailenWeek(main.java:368)
at main.main(main.java:79)
Caused by: javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1907)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:666)
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)
at SendEmail.sendMissingMailWeek(SendEmail.java:226)
... 2 more
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at sun.security.ssl.HandshakeContext.(HandshakeContext.java:171)
at sun.security.ssl.ClientHandshakeContext.(ClientHandshakeContext.java:98)
at sun.security.ssl.TransportContext.kickstart(TransportContext.java:220)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:428)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:549)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:486)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1902)
... 9 more
Process finished with exit code 1
У меня проблема с отправкой электронной почты с помощью Java. Мы использовали GMail около четырех лет для отправки почты с помощью нашего программного обеспечения Java. Теперь я получаю следующую ошибку: [code]Exception in thread "main" java.lang.RuntimeException: javax.mail.MessagingException: Could not convert socket to TLS; nested exception is: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) at SendEmail.sendMissingMailWeek(SendEmail.java:233) at main.negVerkaeufeMailenWeek(main.java:368) at main.main(main.java:79) Caused by: javax.mail.MessagingException: Could not convert socket to TLS; nested exception is: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1907) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:666) 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) at SendEmail.sendMissingMailWeek(SendEmail.java:226) ... 2 more Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) at sun.security.ssl.HandshakeContext.(HandshakeContext.java:171) at sun.security.ssl.ClientHandshakeContext.(ClientHandshakeContext.java:98) at sun.security.ssl.TransportContext.kickstart(TransportContext.java:220) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:428) at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:549) at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:486) at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1902) ... 9 more
Process finished with exit code 1 [/code] Вот мои настройки для GMail: [code] props.put("mail.smtp.auth", "true"); props.put("mail.smtp.starttls.enable", "true"); props.put("mail.smtp.host", "smtp.gmail.com"); props.put("mail.smtp.port", "587"); props.put("mail.smtp.ssl.trust", "smtp.gmail.com"); props.put("mail.smtp.debug", "true"); [/code] Я также попробовал другой почтовый сервер (O365, Strato), но получил ту же ошибку.
В течение нескольких месяцев мое веб-приложение прекрасно работало в разных версиях IE/Firefox/Chrome. Мое приложение работает на IIS 10.0. Когда я запускаю приложение из окна Windows 7 (IE 11.0.***), все работает нормально. Когда я запустил...
Я пытаюсь отправить электронное письмо с помощью JavaMail через SMTP-сервер Gmail. Это код:
final String username = mygmail@gmail.com ;
final String password = mygmailpassword ;
Properties props = new Properties();
props.put( mail.smtp.auth ,...