B4J Question smtp

codie01

Active Member
Licensed User
Longtime User
I am getting an error: java.lang.RuntimeException: Empty writer returned: 554 5.5.1 Error: no valid recipients with the following code:

B4X:
    Dim SMTP As SMTP
    SMTP.Initialize("mail.xxxx.com",25,"[email protected]","xxxxx","SMTP")
    SMTP.To.Add("[email protected]")
    SMTP.MailFrom="[email protected]"
    SMTP.HtmlBody=False
    SMTP.Body = "Have you got it?"
    SMTP.Subject="NEW ACCOUNT ACTIVITY"
    SMTP.UseSSL=False
    SMTP.StartTLSMode = False
    SMTP.AuthMethod=SMTP.AUTH_PLAIN
    SMTP.Send

The complete error was:

java.lang.RuntimeException: Empty writer returned: 554 5.5.1 Error: no valid recipients
at anywheresoftware.b4a.net.SMTPWrapper$1.run(SMTPWrapper.java:307)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)


Thanks in advance
 
Last edited:
Top