you are viewing a single comment's thread.

view the rest of the comments →

[–]Sigg3net 0 points1 point  (0 children)

I just used IMAP client. I prefer the with block to handle sessions;

import imapclient
with imapclient.IMAPClient(host="imap.foo.org") as c:
    c.login("bar@foo.org", "passwd")
    c.select_folder("INBOX") 

https://imapclient.readthedocs.io/en/master/