Website Design United States, Website Design California, Website Designing United States, Website Designing California

Retrieving the subjects from emails in your Gmail inbox - Python

A simple script that retrieves the amount and the subject of threads in any folder in a Gmail account.
It utilizes the new libgmail module, available from libgmail.sourceforge.net

#!/usr/bin/python
import libgmail
from getpass import getpass

username = raw_input("Username: ")
password = getpass("Password: ")
account = libgmail.GmailAccount(username, password)
print "loging %s in" % username
account.login()
print "Logged on."
folder = account.getMessagesByFolder('inbox')

threads = 0
for thread in folder:
threads += 1
print "Thread %i: %s" % (threads,thread.subject)

WEB DESIGN INDIA
42 B Malviya Nagar , New Delhi-110017

Skype: manmeetsi
Email: support.webdesignindia@gmail.com
Tel: 91-011-40502005, 9810067295

 















 


© 2008-2009 dotnet4all.com