Why did this script didn't work? I've tested on gmail.com, IMAP, mail.ru, yandex.ru IMAPs.
from imap_tools import MailBox, AND, A
mb = MailBox('imap.gmail.com').login('email', 'password')
messages = mb.fetch(criteria=A(AND(seen=False), AND(date=current_date)),
mark_seen=False,
bulk=False)
for msg in messages:
print(msg)
Out: imap_tools.errors.MailboxSearchError: Response status "OK" expected, but "NO" received. Data: [b'[CANNOT] Unsupported search criterion: (UNSEEN) ON 27-JUL-2021']
Thx!