Skip to content

Instantly share code, notes, and snippets.

@thomasballinger
Created November 21, 2013 18:48
Show Gist options
  • Select an option

  • Save thomasballinger/7587326 to your computer and use it in GitHub Desktop.

Select an option

Save thomasballinger/7587326 to your computer and use it in GitHub Desktop.
import poplib
USERNAME = '[email protected]'
PASSWORD = 'nevergraduate'
M = poplib.POP3_SSL('pop.gmail.com')
M.user(USERNAME)
M.pass_(PASSWORD)
numMessages = len(M.list()[1])
for i in range(numMessages):
for j in M.retr(i+1)[1]:
print j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment