how to search and fetch with some specific criteria?
arthurchen1906 opened this issue · comments
I follow the docs on https://imapclient.readthedocs.io/en/2.3.1/ to custom search and fetch but it doesn't turn out to be good.
for example,
i tried to search a certain email with
mclient.search(['TO', 'xxxx'])
but encountered with "InvalidCriteriaError"
and then I tried
mclient.search(['HEADER','TO','xxxx'])
no error, but the response is null
then, I tried to fetch the header information,
mclient.fetch(249, data= ['BODY[HEADER.FIELDS (to)]'])[249]
it worked with 'to' info returned
mclient.fetch(249, data= ['BODY[HEADER.FIELDS (X-FFF)]'])[249]
X-FFF is a customised header field, the response is null
Which server are you talking to? Your first attempt looks correct.
来信已收到!我会及时处理。
Closing due to inactivity. Please re-open if you can provide more detail.
来信已收到!我会及时处理。