Net Lib SMTP Error

BobsYourUncle

Member
Licensed User
Longtime User
Hi All,

I'm using Net lib (v1.3) to send an email (smtp). It works fine when I send through Gmail, but I get the following error when I try and send through a different email provider (BTInternet.com). All the ports and login details are definitely correct.

Anyone got any ideas?

Code: Copy
javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xdce7b0: Failure in SSL library, usually a protocol error

error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol (external/openssl/ssl/s23_clnt.c:683 0x40279cc3:0x00000000)

   at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:460)
   at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.<init>(OpenSSLSocketImpl.java:643)
   at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:614)
   at org.apache.commons.net.SocketClient._connectAction_(SocketClient.java:146)
   at org.apache.commons.net.smtp.SMTP._connectAction_(SMTP.java:257)
   at org.apache.commons.net.SocketClient.connect(SocketClient.java:173)
   at org.apache.commons.net.SocketClient.connect(SocketClient.java:193)
   at anywheresoftware.b4a.net.SMTPWrapper$1.run(SMTPWrapper.java:204)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
   at java.util.concurrent.FutureTask.run(FutureTask.java:137)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
   at java.lang.Thread.run(Thread.java:856)
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xdce7b0: Failure in SSL library, usually a protocol error
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol (external/openssl/ssl/s23_clnt.c:683 0x40279cc3:0x00000000)

   at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
   at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:410)
   ... 13 more

Kind regards,
Bob
 
UseSSL has to be set (according to their documentation). If unset then the connection is just dropped. Looks like Net Lib does not support the protocol for the initial handshaking...?
 
Upvote 0
Thanks Margaret. Maybe it isolated to this one provider, but in the UK they are one of the biggest, so I suspect other providers will also have this problem.
 
Upvote 0
I have the same problem using hotmail (live)
SMTP work with gmail and yahoo so far but not with Hotmail,

anyone knows of a workaround ?
is it a bug ?
Code: Copy
TESTAPP: errror sending mail:javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x2bba50: Failure in SSL library, usually a protocol error
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol (external/openssl/ssl/s23_clnt.c:683 0xad12757f:0x00000000)

thanks
 
Upvote 0
Back
Top