imap connecting for mails and seeing inbox
python imap mail@gmail.com
Then write your password and it will want from you the number of message for seeing it to you
this script is working for Gmail you can change to any mail from
mail = imaplib.IMAP4_SSL('imap.gmail.com') #change it to other mails imap connectings