Question

I'm using http://ruby-doc.org/stdlib/libdoc/net/imap/rdoc/index.html to access gmail.

I can search for emails with a particular label, but I'm trying to avoid to search an email twice.

So in order to do that, I thought that I could store the message_id of each email so that in the next searches I would reefer to that message_id to avoid searching for that email.

Do you know how can I do to search emails that are not part of a given email message_id list?

Thanks a lot for your time!

Was it helpful?

Solution

Rather than storing message ids, why don't you just search after a certain message date (which would be the date of your last search)?

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