Prev: Capture the request/response log for local web server throughpython.
Next: Does MS Office need to be installed to use pywin32 for editing Excel docs?
From: Tim Golden on 15 Jun 2010 10:29 On 15/06/2010 15:10, Grant Edwards wrote: > On 2010-06-15, teja<tejaskohok(a)gmail.com> wrote: > >> I have a requirement that I want to log-in into a gmail account read >> all unread mails, mark them as read and then archive them. >> I am using libgmail (version 0.1.11) library to do so, using which I >> am able to log-in into a gmail account fetch all unread message and >> then read them one by one. >> Now my problem is that I am not able to mark the unread mail as read >> and archive it. > > I don't know what libgmail is, but I use IMAP for stuff like that > (with Gmail and other servers). Python's imaplib is a bit low-level > (and IMAP sucks rather badly as a protocol), so you might want to take > a look at imaplib2. > > http://docs.python.org/library/imaplib.html > > http://www.janeelix.com/piers/python/imaplib.html Or imapclient: http://imapclient.freshfoo.com/ TJG
From: Grant Edwards on 15 Jun 2010 11:15 On 2010-06-15, Tim Golden <mail(a)timgolden.me.uk> wrote: > On 15/06/2010 15:10, Grant Edwards wrote: >> On 2010-06-15, teja<tejaskohok(a)gmail.com> wrote: >> >>> I have a requirement that I want to log-in into a gmail account read >>> all unread mails, mark them as read and then archive them. >>> I am using libgmail (version 0.1.11) library to do so, using which I >>> am able to log-in into a gmail account fetch all unread message and >>> then read them one by one. >>> Now my problem is that I am not able to mark the unread mail as read >>> and archive it. >> >> I don't know what libgmail is, but I use IMAP for stuff like that >> (with Gmail and other servers). Python's imaplib is a bit low-level >> (and IMAP sucks rather badly as a protocol), so you might want to take >> a look at imaplib2. >> >> http://docs.python.org/library/imaplib.html >> >> http://www.janeelix.com/piers/python/imaplib.html > > Or imapclient: > > http://imapclient.freshfoo.com/ That looks promising though it's still a bit incomplete (e.g. doesn't support 'idle' or 'examine' commands). But, for simple apps it looks like a good options. -- Grant Edwards grant.b.edwards Yow! What UNIVERSE is this, at please?? gmail.com
From: Tim Golden on 15 Jun 2010 11:33
On 15/06/2010 16:15, Grant Edwards wrote: > On 2010-06-15, Tim Golden<mail(a)timgolden.me.uk> wrote: >> On 15/06/2010 15:10, Grant Edwards wrote: >>> On 2010-06-15, teja<tejaskohok(a)gmail.com> wrote: >>> >>>> I have a requirement that I want to log-in into a gmail >>>> account read all unread mails, mark them as read and then >>>> archive them. I am using libgmail (version 0.1.11) library to >>>> do so, using which I am able to log-in into a gmail account >>>> fetch all unread message and then read them one by one. Now my >>>> problem is that I am not able to mark the unread mail as read >>>> and archive it. >>> >>> I don't know what libgmail is, but I use IMAP for stuff like that >>> (with Gmail and other servers). Python's imaplib is a bit >>> low-level (and IMAP sucks rather badly as a protocol), so you >>> might want to take a look at imaplib2. >>> >>> http://docs.python.org/library/imaplib.html >>> >>> http://www.janeelix.com/piers/python/imaplib.html >> >> Or imapclient: >> >> http://imapclient.freshfoo.com/ > > That looks promising though it's still a bit incomplete (e.g. doesn't > support 'idle' or 'examine' commands). But, for simple apps it looks > like a good options. I think that sums it up fairly well. I've used it for doing various things with my personal email (generating whitelists etc.). It is actively maintained by its owner Menno Smits and lately by Mark Hammond, but presumably only so far as their own requirements demand. TJG |