gmail login failure using python and imaplib

前端 未结 5 2211
-上瘾入骨i
-上瘾入骨i 2020-11-30 08:37

I\'m seeking some help logging into a gmail account and downloading some emails using a python script. I\'m trying to adapt an approach found here, but I\'m running into a p

5条回答
  •  天涯浪人
    2020-11-30 09:31

    If you want to avoid this error without compromising your account's security, use OAuth to authenticate. The protocol is documented here, and there is Python sample code that shows the use of XOAUTH2 with imaplib.

    Independent of this, you should consider enabling two-step verification on your account to make it more secure. If you do, you can use an App Password to connect to IMAP, which might also avoid the above warning.

提交回复
热议问题