I am using imaplib
module to connect to outlook account which used for webdriver tests (our application sends emails). Letter contains screenshot and some text.
I am searching inbox following way: self._imap.search(None, 'UNDELETED', 'UNSEEN', '(TEXT "__some_random_string")')
. Of course, it already connected and logged in. Today I faced strange issue that letter found by __some_random_strin
or by __some_random
but is not found by full string. If I opening message in web interface of Outlook then mark it as unread back IMAP search operation completed successfully.
It seems for me that IMAP initially only searches by first N bytes of message or something like that, but I cannot find any mentions about that. Maybe it is feature of IMAP implementation of Outlook.com?
UPD: If I am searching using following citeria: self._imap.search(None, 'UNDELETED', 'UNSEEN')
or self._imap.search(None, 'UNSEEN')
or self._imap.search(None, 'UNDELETED')
desired message is found successfully.