java.net.SocketTimeoutException

CarlM

Member
Licensed User
Hi,

I am getting a "java.net.SocketTimeoutExceptionError" returned after calls to SMTP.Send using Net Library.

For some reason I am getting a timeout error now after being able to send emails using my Gmail account.
I had only got this account working today after spending a lot of time trying to send with another email account.
It was after I had sent a couple of emails with quite large files as attachments - approximately 500kb (not that big really).

Is there a better way to send emails - that gives more control over the process?
Alos is the SMTP object destroyed automatically whebn the activity it was created in is closed?

Thanks
:confused:




Full error log is here:

Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
Default buffer size used in BufferedWriter constructor. It would be better to be explicit if an 8k-char buffer is required.
"RIL"=>"AMSS" [ label = "cm_ph_cmd_get_ph_info()"];
handlePollStateResult regplmn = 27201
java.net.SocketTimeoutException
at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:564)
at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:88)
at java.io.InputStreamReader.read(InputStreamReader.java:275)
at java.io.BufferedReader.fillBuf(BufferedReader.java:155)
at java.io.BufferedReader.read(BufferedReader.java:261)
at org.apache.commons.net.io.CRLFLineReader.readLine(CRLFLineReader.java:59)
at org.apache.commons.net.smtp.SMTP.__getReply(SMTP.java:196)
at org.apache.commons.net.smtp.SMTP._connectAction_(SMTP.java:264)
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:441)
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:1068)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
at java.lang.Thread.run(Thread.java:1096)
java.net.SocketTimeoutException
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43fdc7f8
"RIL"=>"AMSS" [ label = "cm_ph_cmd_get_ph_info()"];
handlePollStateResult regplmn = 27201
 

CarlM

Member
Licensed User
Weird.

Email (gmail) working fine again without any intervention.

Is there a way to check or set the Socket Timeout using B4A?
 
Top