changeset 7:c461e818f4ca

Changed ImapFeed.py so that it now looks for unread and flagged (starred in gmail) messages. This also looks like it will solve the problem w/ marking an entire conversation as unread in gmail, since starring a conversation doesn't make every single msg in the conversation flagged, it only flags the latest message.
author Atul Varma <varmaa@toolness.com>
date Sat, 05 Apr 2008 22:49:39 -0700
parents f7f1b66283c6
children 4d61c56473c2
files ImapFeed.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ImapFeed.py	Sun Feb 17 19:45:36 2008 -0600
+++ b/ImapFeed.py	Sat Apr 05 22:49:39 2008 -0700
@@ -22,7 +22,11 @@
 
     imap.login( username, password )
     imap.select( mailbox )
-    typ, msgnums = imap.search( None, "UNSEEN" )
+
+    # For more information on searching IMAP, see:
+    # http://tools.ietf.org/html/rfc3501#section-6.4.4
+    typ, msgnums = imap.search( None, "(OR (FLAGGED) (UNSEEN))" )
+
     if typ != "OK":
         raise IOError( "Error searching IMAP folder" )
     msgnums = [ int( num ) for num in msgnums[0].split() ]