Question

I am connecting to my gmail account via IMAP to sync some of my emails and parse them. Sometimes I need to download again some emails because I did some kind of fix and now gmail is not returning me the uids of those emails in any way, here is some code to explain myself better:

typ, data = self.connection.uid('search', None, '(SINCE 14-Dec-2012 BEFORE 20-Dec-2012)')
17:05.55 > HJBM3 UID SEARCH (SINCE 14-Dec-2012 BEFORE 20-Dec-2012)
17:05.69 < * SEARCH
17:05.69 < HJBM3 OK SEARCH completed (Success)
('OK', [''])

I have a good bunch of emails on those dates including the ones I want to parse and it doesn't return anything, depending on the date it does return some uids so is not completely broken.

I decided to try if thunderbird synced correctly those emails and it got them no problem.

I am using the python 2.6 imaplib (version 2.58)

Was it helpful?

Solution

Maybe this will help someone so I'll answer it here:

I had in gmail this setting on:

Gmail Limit IMAP folders

When I changed it to "Do not limit" It worked like a charm.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top