Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python imaplib Gmail authenticate failure

Tags:

python

gmail

imap

I just ran into an issue with Python's imaplib and Gmail's authentication mechanism:

>>> import imaplib
>>> imap = imaplib.IMAP4_SSL('imap.gmail.com', 993)
>>> imap.authenticate('[email protected]', 'Bob Dole likes your style!')
Traceback (most recent call last):
  ...
imaplib.error: AUTHENTICATE command error: BAD ['TODO (not supported yet) 31if3458825wff.5']

If authentication is unsupported, how does one log in?

like image 468
cdleary Avatar asked Dec 09 '08 06:12

cdleary


1 Answers

Instead of

>>> imap.authenticate('[email protected]', 'Bob Dole likes your style!')

use

>>> imap.login('[email protected]', 'Bob Dole likes your style!')
like image 153
Harley Holcombe Avatar answered Nov 11 '22 02:11

Harley Holcombe