I wirte an email client with Net libaray, the code just smtp example.
like this.
The mail was sent error.
Error message is .
java.lang.RuntimeException: Empty writer returned: 503 5.5.2 Send hello first [HKAPR04CA0014.apcprd04.prod.outlook.com]
what else do I need to do?
like this.
B4X:
Sub Process_Globals
Dim SMTP As SMTP
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
SMTP.Initialize("smtp-mail.outlook.com", 587, "my@outlook.com", "mypassword", "SMTP")
SMTP.StartTLSMode = True
End If
SMTP.To.Add("othermail@example.com")
SMTP.Subject = "This is the subject"
SMTP.Body = "This is the message body."
'SMTP.AddAttachment(File.DirRootExternal, "somefile")
SMTP.Send
End Sub
Sub SMTP_MessageSent(Success As Boolean)
Log(Success)
If Success Then
ToastMessageShow("Message sent successfully", True)
Else
ToastMessageShow("Error sending message", True)
Log(LastException.Message)
End If
End Sub
The mail was sent error.
Error message is .
java.lang.RuntimeException: Empty writer returned: 503 5.5.2 Send hello first [HKAPR04CA0014.apcprd04.prod.outlook.com]
what else do I need to do?