Android Question codes of error SMTP of servers

ComposerB4A

Member
Licensed User
Longtime User
Hi to all, any persons know obtain code of error in SMTP server
i ask because that with "address y password 1" all work good (SMTP and POP servers), but
with "address y password 2" only work pop server, in webpage "yahoo" say that exist "number of error (SMTP)", that answer ¿how obtain the code of error SMTP (in library NET)?
 

tunderin

Member
Licensed User
Longtime User
Hi to all, any persons know obtain code of error in SMTP server
i ask because that with "address y password 1" all work good (SMTP and POP servers), but
with "address y password 2" only work pop server, in webpage "yahoo" say that exist "number of error (SMTP)", that answer ¿how obtain the code of error SMTP (in library NET)?


Try using an event handler for your smtp.send

B4X:
Sub Smtp_MessageSent(Success As Boolean)
  If Success Then
  ToastMessageShow("Message sent", True)
  Else
  ToastMessageShow("Error: " & LastException.Message , True)
  End If
End Sub
 
Upvote 0

ComposerB4A

Member
Licensed User
Longtime User
thanks,
i tried code (for "address y password 2" in SMTP) and the log say:
(RuntimeException) java.lang.RuntimeException: Error sending message.
 
Upvote 0

ComposerB4A

Member
Licensed User
Longtime User
Thanks, i tried the code with unfilter log and
B4X:
sslSelect READ fd=45 appData=0x13a2d8 timeout=60000 => 1
Doing SSL_Read()
Returned from SSL_Read() with result 20, error code 0
Entering sslWrite(), caller requests to write 33 bytes...
Doing SSL_write() with 33 bytes to go
Returned from SSL_write() with result 33, error code 0
Successfully wrote 33 bytes
Entering sslRead, caller requests to read 8008 bytes timeout=60000...
Doing SSL_Read()
Returned from SSL_Read() with result -1, error code 2
sslSelect type=READ fd=45 appData=0x13a2d8 timeout=60000
GC_EXPLICIT freed 13K, 52% free 2734K/5635K, external 0K/0K, paused 199ms
DM_IsLocked, lockflag is false
setButtonBrightnessOverride -1
DM_IsLocked, lockflag is false
setButtonBrightnessOverride -1
GC_EXPLICIT freed <1K, 52% free 2734K/5635K, external 0K/0K, paused 150ms
sslSelect READ fd=45 appData=0x13a2d8 timeout=60000 => 1
Doing SSL_Read()
Returned from SSL_Read() with result 20, error code 0
Entering sslWrite(), caller requests to write 6 bytes...
Doing SSL_write() with 6 bytes to go
Returned from SSL_write() with result 6, error code 0
Successfully wrote 6 bytes
Entering sslRead, caller requests to read 7988 bytes timeout=60000...
Doing SSL_Read()
Returned from SSL_Read() with result -1, error code 2
sslSelect type=READ fd=45 appData=0x13a2d8 timeout=60000
GC_EXPLICIT freed <1K, 52% free 2734K/5635K, external 0K/0K, paused 86ms
DM_IsLocked, lockflag is false
setButtonBrightnessOverride -1
Process com.google.android.partnersetup (pid 1681) has died.
sslSelect READ fd=45 appData=0x13a2d8 timeout=60000 => 1
Doing SSL_Read()
Returned from SSL_Read() with result 36, error code 0
Entering sslWrite(), caller requests to write 174 bytes...
Doing SSL_write() with 174 bytes to go
Returned from SSL_write() with result 174, error code 0
Successfully wrote 174 bytes
Entering sslRead, caller requests to read 7952 bytes timeout=60000...
Doing SSL_Read()
Returned from SSL_Read() with result -1, error code 2
sslSelect type=READ fd=45 appData=0x13a2d8 timeout=60000
GC_CONCURRENT freed 292K, 45% free 3321K/6023K, external 0K/0K, paused 3ms+18ms
GC_EXPLICIT freed 733K, 38% free 6659K/10695K, external 2166K/3570K, paused 176ms
Process com.svox.pico (pid 1688) has died.
sslSelect READ fd=45 appData=0x13a2d8 timeout=60000 => 1
Doing SSL_Read()
Returned from SSL_Read() with result 148, error code 0
java.lang.RuntimeException: Error sending message.
    at anywheresoftware.b4a.net.SMTPWrapper$1.run(SMTPWrapper.java:294)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:475)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:337)
    at java.util.concurrent.FutureTask.run(FutureTask.java:169)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1119)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:612)
    at java.lang.Thread.run(Thread.java:1052)
close [socket][/0.0.0.0:48280]
(RuntimeException) java.lang.RuntimeException: Error sending message.
NO Enviado
In log appear several lines with texts "SSL" and "error code"
 
Upvote 0

ComposerB4A

Member
Licensed User
Longtime User
Thanks, i tried with "StartTLSMode" and the log show:
B4X:
** Activity (main) Create, isFirst = true **
SMTP inicializado
** Activity (main) Resume **
intento de envio de Email
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
PackageAdded: package:com.fractalist.MobileAcceleration_V5
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Resume **
(SocketTimeoutException) java.net.SocketTimeoutException
NO Enviado
in others case with "address y password 1" work good (without TLS), but with "address y password 2" not send the message
 
Upvote 0
Top