Using xoauth2, not able to send email from Gmail account with error : Negative SMTP reply: 530 5.5.1
See original GitHub issueI 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:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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).
(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 😉 )