Reputation: 342
The following code works with another gmail account of mine, but fails with the account im now using, I've already set up POP3 for both accounts!
import email, poplib
from email.header import decode_header
_MAXLINE = 2048
login = '[email protected]'
password = 'genericpass'
pop_server = 'pop.gmail.com'
pop_port = '995'
mail_box = poplib.POP3_SSL(pop_server, pop_port)
mail_box.user(login)
mail_box.pass_(password)
The error:
raise error_proto(resp)
poplib.error_proto: b'-ERR [AUTH] Username and password not accepted.'
Upvotes: 5
Views: 4884
Reputation: 341
Try to enable "Access for less secure apps" in your Google Account.
Upvotes: 3