java.net.socketTimeout.Exception: тайм-аут чтения - PullRequest
0 голосов
/ 27 августа 2018

Даже после успешного подключения к хосту я получаю следующую ошибку: .................................................. ...........................

DEBUG: setDebug: JavaMail version 1.5.5
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: need username and password for authentication
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.mail.yahoo.com", port 587, isSSL false
220 smtp.mail.yahoo.com ESMTP ready
DEBUG SMTP: connected to host "smtp.mail.yahoo.com", port: 587

DEBUG SMTP: exception reading response, THROW: 
java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:124)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:92)
    at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2331)
    at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:1620)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:703)

................................................................................
I am using javamail 1.5.5 jar. I took the code from github https://github.com/FoulerBenny/SampleProject/blob/master/src/main/java/com/genericLibraries/EmailAttachmentSender.java

Мое намерение - использовать SSL, но в первую очередь пытаюсь так, так как SSL слишком долго отвечает ,

...