On 06/15/2010 11:07 AM, teja wrote: > And there's a email library provided in Python (supports both POP and > SMTP) but I dont know whether it allows us to archive mails or mark > them as read for that matter.
POP (the protocol) only allows downloading messages, AFAIK. SMTP is for sending. A more powerful e-mail protocol is IMAP, which gmail also supports. I don't know about Python libraries, you'll probably find a reasonably full-featured one, but IMAP supports marking messages as read. As for archiving, I'm guessing that this'd be implemented by moving messages to an "archive" folder. Maybe you should connect to gmail with an email client (Thunderbird is nice) via IMAP and check 1. whether you can archive mails from there 2. how exactly gmail archiving maps to IMAP and then implement it using IMAP, having your script just do the same thing you did in Thunderbird, WLM, Sylpheed, Mail.app, or whatever you're using. Have fun, Thomas -- http://mail.python.org/mailman/listinfo/python-list