# Connect to the email server mail = imaplib.IMAP4_SSL('imap.example.com') mail.login('username', 'password')