java.lang.Runtime Exception: Empty writer returned: 530-5.5.1 Authentication Required

jpvniekerk

Active Member
Licensed User
Longtime User
My program sends SMTP emails via my own gmail account. Numerous users have no problems, but one user gets the error "java.lang.Runtime Exception: Empty writer returned: 530-5.5.1 Authentication Required" when an email is sent.

What causes this and how can it be corrected?

Thanks for any help.
 

jpvniekerk

Active Member
Licensed User
Longtime User
Are you setting UseSSL to true?

Yes, Here is my first piece of code relating to emailing:

B4X:
If FirstTime Then
   ...
   ...
   ...
   ...
   ...
   SMTP1.Initialize("smtp.gmail.com", 465, "[email protected]", "******", "SMTP")
   SMTP1.UseSSL = True
      
End If

... are other commands that has nothing to do with email.
 
Upvote 0

jpvniekerk

Active Member
Licensed User
Longtime User
No, I don't have access to the device. Apparently it happens on this device "all the time". Not sure if it is always on the same network.
 
Upvote 0

jpvniekerk

Active Member
Licensed User
Longtime User
Any idea of how to overcome this problem? - without having to resort to trying the carrier to change their firewall! The issue is in Namibia - pretty difficult to discuss technical issues with them!
 
Upvote 0

Dman

Active Member
Licensed User
Longtime User
I had this same issue and did a google search and wound up here. In case anyone else has had this issue, what fixed it for me was entering the CORRECT password for the gmail account. I had a typo in my code on my test app and was using the gmail address for the address AND the password.

Just thought I would pass it along.
 
Upvote 0

RFman

New Member
Licensed User
Longtime User
I had this same issue and did a google search and wound up here. In case anyone else has had this issue, what fixed it for me was entering the CORRECT password for the gmail account. I had a typo in my code on my test app and was using the gmail address for the address AND the password.

Just thought I would pass it along.
Ater getting this error, got a gmail indicating that if I want my app to have access to sent gmail to change my security settings at the link provided. I did so, and the gmail now works with my app.
 
Upvote 0
Top