In my application I connect to server to authenticate users. This is code:
try { Properties prop = new Properties(); prop.put(\"mail.smtp.startt
Can you setup the Socket I/O timeout as well. When it is connected but failed to read data from the server then it will continue to wait.
prop.put("mail.smtp.timeout", 1000);
Read timeout indicates you are connected but not able to read data from the server.