My code monitors an email inbox periodically.
The code sample:
mail = imaplib.IMAP4_SSL(host=server, port=port)
mail.login(account, password)
mail.select()
typ, msgnums = self.mail.search(*WHERE I WANT TO IMPLEMENT*)
After one monitoring ends, I save the last seen email's 'Message-ID' field.
For the next monitoring, I want to search the inbox from the latest email to the email that has the 'Message-ID' field.
How can I make this happen?
I've checked imap search criteria, and couldn't find any that can be used for this case.
Thanks :)