imaplib.IMAP4.open

IMAP4.open(host='', port=143)[source]
Setup connection to remote server on “host:port”
(default: localhost:standard IMAP4 port).
This connection will be used by the routines:
read, readline, send, shutdown.