Advertisement
etidbury

Untitled

Apr 21st, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. M = imaplib.IMAP4()
  2. M.login('et403@live.mdx.ac.uk', '[my university password]')
  3. M.select()
  4. typ, data = M.search(None, 'ALL')
  5. for num in data[0].split():
  6.     typ, data = M.fetch(num, '(RFC822)')
  7.     print 'Message %s\n%s\n' % (num, data[0][1])
  8. M.close()
  9. M.logout()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement