smtp send error

hdtvirl

Active Member
Licensed User
Longtime User
Hello All, I am trying to send emails from an app using a sqlite database holding the recipient details. When I attempt to send the mail I get the following error.

"Java.lang.runtimeException:Empty writer returnedd:503.5.0.0 Need MAIL command"

I have check the connection to the SMTP server using the client on the Table and also on a PC and they all work.

I have also tried changes how the smpt client is initialised.

SMTPServer.Initialize("smtp.acme.com",587,"username","password","SMTPServer")

SMTPServer.Initialize("smtp.acme.com",587,"[email protected]","password","SMTPServer")

I get the following error when trying to log on this way

Java.lang.runtimeException:Empty writer returnedd:503.5.0.0 Need RCPT(recipient)

even though I have this command SMTPServer.To.Add("[email protected]")


I have check the beginner guide /Tutorials on SMTP (http://www.b4x.com/android/help/net.html#smtp) and I can't find anything on the errors.


Any help appreciated.


Regards

BOB
 
Last edited:

hdtvirl

Active Member
Licensed User
Longtime User
Update.

I have since tried it with another SMTP server and it works just as described so it is not my code, I would still be interested if anybody else has had the same errors and how you got around it. I have had a look at some VB.net code which talks to the same SMTP server as the one Iam getting the error on and the only difference is the smtp is passed credentialas as

stmpMail.credentials = 'basicAuthenticationInfo'.

Regards

BOB
 
Upvote 0

hdtvirl

Active Member
Licensed User
Longtime User
Erel, Thanks for the response.

this command is from the VB.NET app.

stmpMail.credentials = 'basicAuthenticationInfo'.


Regards

BOB
 
Upvote 0

Hagen Schloemer

Member
Licensed User
Longtime User
Hi!

I have exact the same problem. I cant send data via smtp to my provider with the error 503 "Valid RCPT command must precede data". I have tested multiple variants mit and without "sender", the init has a separate user-name als login, but the "sender" can be the real mail-adress or the username, everytime the same result. I think it is provider-specific, i know this problem from outlook, here it can be solved by the setting "smtp-server needs authentication"......

best regards
Hagen
 
Upvote 0
Top