Skip to content

Instantly share code, notes, and snippets.

@bradclawsie
Created December 5, 2010 06:25
Show Gist options
  • Save bradclawsie/728865 to your computer and use it in GitHub Desktop.
Save bradclawsie/728865 to your computer and use it in GitHub Desktop.
imap biff in python
#!/usr/bin/python
import imaplib
M = imaplib.IMAP4_SSL('imap.gmail.com')
if (M.login('[email protected]','PASSWORD')[0] != 'OK'): exit("no conn")
c = (M.select('Inbox'))[1][0]
if (c != '0'):print c
M.shutdown()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment