I'm using impalib to connect to my gmail:
import imaplib
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('bi@great_company', 'app_password')
mail.select('"[Gmail]/All Mail"', readonly=True)
this finds an email:
mail.search(None, 'SUBJECT "Green Law_Settlement_12242022"')
the email subject is: "Green Law_Settlement_12242022.xlsx"
but this does not return any match:
mail.search(None, 'SUBJECT "Green Law_Settlement_122"')
I need all the mails where the subject starts with "Green Law_Settlement_" any way of doing that?