Create a connection to an IMAP server using the hostname and port 143
? login username password
To see a list of all the mailboxes on the server we use the list command. The arguments “” “*” simply get all the mailboxes including sub folders.
? list "" "*"