I am trying to use imaplib in order to fetch my mails
import imaplib
mail= imaplib.IMAP4_SSL("imap.gmail.com")
mail.login("mymailaddress","mypassword")
mail.select("inbox")
but unfortunately, I am getting the following error
File , line 3, in <module>
mail.login("mymailaddress","mypassword")
raise self.error(dat[-1])
imaplib.error: b'[ALERT] Application-specific password required: https://support.google.com/accounts/answer/185833 (Failure)'
I have checked all other suggestion given on similar question but none are working (similar problem). I even enabled IMAP on my account. I also allow less secure app. What might be the reason for this error?
