easyimap - connect to gmail fails with invalid credentials

458 Views Asked by At

i'm trying to connect to my gmail account via imap with easyimap (0.6.3), but I got all the time error: b'[AUTHENTICATIONFAILED] Invalid credentials (Failure)' .

My code is simple:

import easyimap
imapper = easyimap.connect(host, '[email protected]', 'password', 'INBOX.subfolder') 

. By default port 993 is used and SSL is True.

I'm absolutely sure my password is correct, and I also tried to use username instead of [email protected] - same results.

In the gmail setting I turned on IMAP (Status: IMAP is enabled) which might be kinda important, but not enough.

What else can I do if my credentials are correct? I don't have much knowledge about gmail, and this was used only for mailing (through the web interface), nothing else. I can't sign in to admin.gmail.com (it accepts the credentials, but does nothing), so I'm unsure if (and how) i need to enables less secure app access .

What else could I do to find out what is the problem?

Python: 3.5.2 .

Thanks.

0

There are 0 best solutions below