imaplib.IMAP4_SSL.authenticate

IMAP4_SSL.authenticate(mechanism, authobject)

Authenticate command - requires response processing.

‘mechanism’ specifies which authentication mechanism is to be used - it must appear in <instance>.capabilities in the form AUTH=<mechanism>.

‘authobject’ must be a callable object:

data = authobject(response)

It will be called to process server continuation responses. It should return data that will be encoded and sent to server. It should return None if the client abort response ‘*’ should be sent instead.