I'm trying to find some emails in my Gmail mailbox, using imap_tools and specific criterias. This is my code:
import time
from imap_tools import MailBox, AND, A
with MailBox('imap.gmail.com').login('email', 'password', 'INBOX') as mailbox:
time.sleep(3)
while True:
for msg in mailbox.fetch(AND(from_="some_domain", mark_seen=False)):
...
when trying to use 'mark_seen=False' or 'reverse = True' , its giving me this error:
raise KeyError('"{}" is an invalid parameter.'.format(key))
KeyError: '"mark_seen" is an invalid parameter.'
How can I solve this?