Problem with Imap Python Library
To Whom It May Concern, We are aware that the imap library has changed the way to authenticate and it does not allow the simple authentication. So, we are trying to authenticate via OAUTH2 authentication. Here, I show you an example of how we are trying to recover the inbox of our email: # Your Outlook account email address email = your-email@outlook.com<mailto:your-email@outlook.com> # The access token for your Outlook account access_token = "your-access-token" # Connect to the IMAP server imap_server = imaplib.IMAP4_SSL("outlook.office365.com") # Authenticate using the access token imap_server.authenticate('XOAUTH2', lambda x: access_token) # Select the inbox folder imap_server.select("inbox") This example shows us an error "imaplib.error: AUTHENTICATE failed." in the line "imap_server.authenticate('XOAUTH2', lambda x: access_token)" and it seems that the data was specified correctly. So, we have some questions: * Are we doing something wrong? * Do you know what is happening with the imap library? * How can we recover the inbox messages from our email using the OAUTH2 authentication of the imap library? Thank you for the effort. Yours faithfully, Guillem Cortiada Rovira | Solutions Assistant guillem.cortiadarovira@nttdata.com<mailto:guillem.cortiadarovira@nttdata.com> NTT DATA NTT DATA Towers. Avda. Icària, 199, 08005 Barcelona, Spain Leer más en: es.nttdata.com [Pantalla de video juego Descripción generada automáticamente con confianza baja] ________________________________ This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding.
participants (1)
-
Guillem Cortiada Rovira