I am running a cron job which executes the python script for reading gmail (2 min interval). I have used imaplib for reading the new mails. This was working fine until yesterday. Suddenly its throwing below error
imaplib.error: [AUTHENTICATIONFAILED] Invalid credentials (Failure)
and sometimes i am getting the below error
raise self.abort(bye[-1]) imaplib.abort: [UNAVAILABLE] Temporary System Error
When i run the same script on a different machine. Its working fine. I am assuming that the host has been blacklisted or something like that.
What are my options ?
I cant generate the Credentials (Gmail API) as this is under company domain account.
Enable IMAP Access in Gmail Settings Log into your Gmail account and click on a small gear in the right top corner of the window. Select See all settings. After that, go to the Forwarding and POP/IMAP tab. You need to make sure the IMAP Status is set to Enabled.
try with:
1) https://myaccount.google.com/lesssecureapps?pli=1
2) Gmail Settings -> Forwarding and POP / IMAP -> IMAP Acess to Enable IMAP
Some apps and devices use less secure sign-in technology. So we need to enable Less secure app access
option from gmail account.
Steps:
Security
sectionLess secure app access
By following above steps, issue will be resolved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With