Advertisement
Guest User

Untitled

a guest
Aug 1st, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import imaplib
  2. import base64
  3.  
  4. email_user = input('Email: ')
  5. email_pass = input('Password: ')
  6.  
  7. M = imaplib.IMAP4_SSL('imap-mail.outlook.com', 993)
  8. M.login(email_user, email_pass)
  9. M.select()
  10. typ, data = M.search(None, 'ALL')
  11. for num in data[0].split():
  12. typ, data = M.fetch(num, '(RFC822)')
  13. num1 = base64.b64decode(num1)
  14. data1 = base64.b64decode(data)
  15. print('Message %sn%sn' % (num, data[0][1]))
  16. M.close()
  17. M.logout()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement