question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using xoauth2, not able to send email from Gmail account with error : Negative SMTP reply: 530 5.5.1

See original GitHub issue

I am using latest xoauth2 branch. Gmail account is configured without any issue. I can receive email successfully, but when trying to send email from app, it gives below error :

Failed to send message

                                                    com.fsck.k9.mail.transport.SmtpTransport$NegativeSmtpReplyException: Negative SMTP reply: 530 5.5.1  https://support.google.com/mail/?p=WantAuthError i76sm57306224pfk.89 - gsmtp
                                                        at com.fsck.k9.mail.transport.SmtpTransport.checkLine(SmtpTransport.java:657)
                                                        at com.fsck.k9.mail.transport.SmtpTransport.executeSimpleCommand(SmtpTransport.java:698)
                                                        at com.fsck.k9.mail.transport.SmtpTransport.executeSimpleCommand(SmtpTransport.java:662)
                                                        at com.fsck.k9.mail.transport.SmtpTransport.sendMessageTo(SmtpTransport.java:536)
                                                        at com.fsck.k9.mail.transport.SmtpTransport.sendMessage(SmtpTransport.java:512)
                                                        at com.fsck.k9.controller.MessagingController.sendPendingMessagesSynchronous(MessagingController.java:3143)
                                                        at com.fsck.k9.controller.MessagingController$21.run(MessagingController.java:3022)
                                                        at com.fsck.k9.controller.MessagingController.run(MessagingController.java:260)
                                                        at java.lang.Thread.run(Thread.java:818)

Version: xoauth2 branch Android version : 6.01 Account type : IMAP

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
philipwhiukcommented, Nov 24, 2016

Even I don’t run that code on my device any more and I wrote it! I believe there’s possibly still a bug surrounding the refresh of tokens which I think is what you’re hitting. I was always able to fix it by going into the settings and just forcing it to refresh by ‘Next’-ing through the dialogs.

I intend to fix it when I get round to re-working the account setup and management code.

I intend to completely re-implement the way that XOAUTH2 is handled in the front-end because the current system can only ever support GMail and shortly after I developed it both Yahoo and Microsoft started pushing XOAUTH2 which meant @cketti and I agreed it would be unhelpful to merge it.

The only reason I didn’t delete the branch is because I’ll need to grab some of the code when I come to re-implement.

I’ve been putting it off because it requires time to sit down and rework large chunks of the UX and Account classes.

PS: Also the line numbers don’t match up with the latest version of the xoauth2 branch. I think I did a force push at one point to tidy up the huge number of commit’s I’d made.

I’ll leave this open as a reminder to check the behaviour but the fixes will be applied as new PR to master. (Once it’s merged the xoauth2 branch will be deleted).

1reaction
Valodimcommented, Nov 24, 2016

(For the record, if you are using an experimental branch, it might be worth mentioning that from the get go instead of silently omitting the version number from the template 😉 )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using xoauth2, not able to send email from Gmail account with ...
Using xoauth2, not able to send email from Gmail account with error : Negative SMTP reply: 530 5.5.1 #1814.
Read more >
Gmail SMTP errors and codes - Google Workspace Admin Help
You may see the following error messages and codes when using Gmail with Google Workspace . The messages and codes are helpful tools...
Read more >
Unable to send email to gmail on javamail using xoauth
i have been working on a project which involves connecting gmail smtp and sending emails using oauth2 based connection. im using samples provided...
Read more >
SMTP error 530: Authentication Required - Let's fix it!!
SMTP is responsible for sending emails. If an email is not sent, it gives error messages with codes. This helps in easy troubleshooting....
Read more >
The Flask Mega-Tutorial, Part XI: Email Support
There are several more ways in which email support can be useful, so we'll make sure we design a generic framework for sending...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found