Hello, I try to send a test email and after several seconds the operation ends with an error. Any idea that it could be wrong with my code? Thanks in advance
B4X:
'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
Sub Process_Globals
Dim SmtpServer As SMTP
End Sub
Sub AppStart (Args() As String)
CallSubDelayed(Me, "EnviarCorreo")
StartMessageLoop
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Private Sub EnviarCorreo
SmtpServer.Initialize("smtp.fibertel.com.ar", 25, "[email protected]","xxxxxx","SMTP")
SmtpServer.To.Add("[email protected]")
SmtpServer.Subject = "Prueba de Envio"
SmtpServer.Body = "Prueba Prueba Prueba Prueba"
SmtpServer.Send
End Sub
Sub SMTP_MessageSent(Success As Boolean)
If Success Then
Log("*** OK ***")
Else
Log("*** Error ***")
End If
End Sub
Waiting for debugger to connect...
Program started.
java.lang.RuntimeException: Empty writer returned: 503 5.5.2 Hi [1xx.xx8.1xx.x5], Waiting for RCPT command
at anywheresoftware.b4a.net.SMTPWrapper$1.run(SMTPWrapper.java:313)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
*** Error ***