Sorry if this isn't a great question,
Im using imap_tools (https://pypi.org/project/imap-tools/) to fetch mails that are to = emails provided in a list (forwarded to one imap).
At the moment im using an if after fetching mails to see if 'to[0]' is in list, then continuing on. But this checks all emails and feels slower than it needs to be. Is there a way to only fetch the mails based on a to[0] str list in the first place?