B4J Question smtp.gmail.com

Harris

Expert
Licensed User
Longtime User
Error:
java.lang.RuntimeException: Empty writer returned: 530-5.7.0 Authentication Required. Learn more at
530 5.7.0 https://support.google.com/mail/?p=WantAuthError x16sm6245133qki.89 - gsmtp



After many days trying to use "Private smtp As SMTP" in my server app (which used to work just fine), I finally solved the issue stated above...

CHANGE (RESET) YOUR GMAIL PASSWORD!

Unusual sign-in location detected
Why you must complete an additional step to sign in
We've detected that you're signing in from a different location than you normally do, and we want to make sure that someone else isn't trying to access your account.
If you can’t provide the information requested
If you can’t verify your identity by providing the information requested, you can also access your account by resetting your password.
How this additional step protects your account
The additional step at sign in is designed to prevent an unauthorized person who does not know you from accessing your account, even if they've obtained your username and password. While this won't necessarily stop people who know you from accessing your account (for that, try 2-step verification), it's an important measure to keep hijackers who have a long list of passwords from doing malicious things with your account, such as creating spam or accessing and deleting valuable data.
Examples of additional steps
Below are some examples of the additional steps we’ll ask you to complete in order to help verify your identity. Depending on the recovery options you’ve previously set up, some examples might not be applicable to your account.
  • Answering your secret question
  • Verifying your phone number
  • Entering a code we’ll send you via SMS or voice message
  • Verifying your recovery email address
  • Verifying a previous location from where you’ve signed-in

If you think you should not have been asked to complete this step or have other comments for us, please send us your feedback.

It now works with both 465 and 587 ports and appropriate settings.
Just wish someone had posted this earlier - would have saved me many hours of futility...
 

jinyistudio

Well-Known Member
Licensed User
Longtime User
I have same question too. java.lang.RuntimeException: Empty writer returned: 530-5.7.0 Authentication Required. After I changed my password, it still didn't work.o_O
When i try to change TLSmode or SSL. it always give me java.lang.RuntimeException: Empty writer returned: 530 5.7.0 Must issue a STARTTLS command first. o20sm1084368pgh.63 - gsmtp o_O

B4X:
Try
    'start sending the email
    esmtp.Initialize(sserver, sport, susername, spassword, "smtp")  
    If sStartTLSMode = "1" Then
        esmtp.StartTLSMode = True
    Else
        esmtp.StartTLSMode = False
    End If  
    If sUseSSL = "1" Then
        esmtp.UseSSL = True
    Else
        esmtp.UseSSL = False
    End If
    esmtp.To.Add(semail)
    esmtp.Subject = subject
    'esmtp.Send
    Wait For (esmtp.Send) smtp_MessageSent(Success As Boolean)
    Return Success
Catch
    Return False
End Try
o_O
 
Last edited:
Upvote 0

Harris

Expert
Licensed User
Longtime User
Contact Google.... Freakin basstodds...

Everytime I use a valid email, they make me guess that I have to reset a new password.
There needs to be a way with them (google) to lock down a pw so our simple systems will still work!!!!
 
Upvote 0

tchart

Well-Known Member
Licensed User
Longtime User
Google are cracking down on using Gmail as a server relay. I have several customers who use Integromat. Previous Gmail worked fine then it stopped working reliably for free accounts.


If you send less that 1000 emails a month I'd suggest you check out smtp2go. They have been very reliable for me.

 
Upvote 0

cklester

Well-Known Member
Licensed User
If you send less that 1000 emails a month I'd suggest you check out smtp2go. They have been very reliable for me.


Amazon's SES is also a cheap option; only $0.10 per 1000 emails sent. You'll spend only $4 for 40,000 emails sent.
 
Upvote 0
Top