How can I access my email with python imaplib or otherwise?

Viewed 262

My email account requires 4 pieces of information in order to connect to it:

  1. Email address
  2. Incoming mail server
  3. Password
  4. Username to the server (not the same as email)

Using imaplib I'm able to do the following:

mail = imaplib.IMAP4_SSL('server_url', 993)
mail.login(email_address, password)

This uses the first three on the list but I couldn't find an argument or a method that would also allow me to specify the username to the server (not same as email). Where can I input that username to be able to connect?

Here is how I set it up in settings on mac, I need to do the equivalent in python

Thank you

0 Answers
Related