I configured IMAP and SMTP in a third-party mail client as required by outlook,It works well.
In B4j I use same way to set SMTP, it does not work, my code is
error is
I searched for the issue on the forums and found 2 threads(thread1 and thread2) that same issue, Both of them seem to have solved the issue. I downloaded the example (v0.4) of thread1 in post #33 and it does not work yet.
In B4j I use same way to set SMTP, it does not work, my code is
B4X:
SMTP.Initialize("mailserver", portnumber ,"example@hotmail.com" , "password", "smtp")
SMTP.Subject = Subject
SMTP.Body = Body
SMTP.To.Add(MailTo)
SMTP.StartTLSMode = True
SMTP.Send
B4X:
Program started.
SMTP Initialize Done
SendEmail
org.apache.commons.net.smtp.SMTPConnectionClosedException: Connection closed without indication.
at org.apache.commons.net.smtp.SMTP.__getReply(SMTP.java:199)
at org.apache.commons.net.smtp.SMTP.__sendCommand(SMTP.java:171)
at org.apache.commons.net.smtp.SMTP.__sendCommand(SMTP.java:186)
at org.apache.commons.net.smtp.SMTP.rcpt(SMTP.java:524)
at org.apache.commons.net.smtp.SMTPClient.addRecipient(SMTPClient.java:314)
at anywheresoftware.b4a.net.SMTPWrapper$1.run(SMTPWrapper.java:298)
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)
eMail Failed to send - To: xxxxx@xxxxxx.xxx Subject: subject test1
org.apache.commons.net.smtp.SMTPConnectionClosedException: Connection closed without indication.
I searched for the issue on the forums and found 2 threads(thread1 and thread2) that same issue, Both of them seem to have solved the issue. I downloaded the example (v0.4) of thread1 in post #33 and it does not work yet.