Created
September 9, 2011 19:14
Revisions
-
bollovan created this gist
Sep 9, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #! /usr/bin/python2 import os import string import urllib #Enter your username and password below within double quotes # eg. username="username" and password = "password" username = "user" password = "pass" com = urllib.urlopen("https://" + username + ":" + password + "@mail.google.com/mail/feed/atom") temp = com msg = temp.read() index = string.find(msg, "<fullcount>") index2 = string.find(msg, "</fullcount>") fc = int( msg[ index + 11:index2 ] ) if fc == 0: print "no new emails" else: print str(fc) + " new emails"