I am trying to fetch unread emails using imap_tools then want to mark them as read. I have tried using mark_seen
but I end up in an indefinite loop rereading the emails that have been marked as unread. Here's my code snippet:
msgs = client.fetch(AND(seen=False, date_gte=datetime.date(2021, 7, 30), subject='away'), mark_seen=False)