Android Question Net lib error 503 senting email

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Hi, I am using the code Ifound to send an email and no matter what I code I allways get a 503 error
The smtp need authentication but works in port 25

B4X:
Sub bMail_Click
  SMTP.Initialize("mail.armi.com.ar", 25, "[email protected]", "password", "SMTP")
  SMTP.UseSSL=False
  SMTP.StartTLSMode = False
  SMTP.To.Add("[email protected]")
  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 "&LastException.Message, True)
    Log(LastException.Message)
  End If
End Sub

How can I fix it?

Thanks
 

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Bad secuence of command. You must especify the recipient of the message before you can send it.

Im using the same user and pass I use in my desktop mail app
 
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
This sound like a outgoing server authentication issue. Here are a couple things to try.

An alternate outgoing port (if available) example 26,587,465 etc.
Try a different outgoing server(if available) You could use your ISP's outgoing server(just for testing)

See this explanation of your error: http://www.amailsender.com/mailerhelp/09_send_errors.htm
 
Upvote 0
Top