This is tutorial on how to read gmail emails with python programme : ----------------- #!/usr/bin/python __author__ = 'Robokishan' import email import imaplib import ctypes import getpass mail = imaplib.IMAP4_SSL('imap.gmail.com',993) unm = raw_input("insert Email : ") #pwd = raw_input("insert password : ") pwd = getpass.getpass("input : ") mail.login(unm,pwd) mail.select("INBOX") def loop(): mail.select("INBOX") n=0 (retcode, messages) = mail.search(None, '(UNSEEN)') if retcode == 'OK': for num in messages[0].split() : #print 'Processing ' n=n+1 print n typ, data = mail.fetch(num,'(RFC822)') for response_part in data: if isinstance(response_part, tuple): ...
Very Nice tutorial. can you share code
ReplyDelete