node-imap icon indicating copy to clipboard operation
node-imap copied to clipboard

Can not search references header.

Open HazemElAgaty opened this issue 7 years ago • 3 comments

I was trying to fetch a messages thread by searching for all messages referencing the first sent message (i.e. messages that have the first message_id in the references header array).

The query I am using is ["ALL", ["HEADER","REFERENCES","<13434118-f686-ce7b-e384-d887030ed21d@*******.com>"]].

The output is always nothing to fetch. Any idea how to write such a query?.

HazemElAgaty avatar Nov 11 '18 13:11 HazemElAgaty

That looks correct to me. If you're searching on the gmail server, a brief google search shows others with similar problems on gmail so I would say it's something wrong on gmail's end.

mscdex avatar Nov 11 '18 13:11 mscdex

First of all thank you for the quick reply. I have just tried the same scenario with outlook and got the same output "Nothing to fetch". However, when i tried searching by "in-reply-to" header I get the message that I want (i.e. ["ALL", ["HEADER","in-reply-to","<13434118-f686-ce7b-e384-d887030ed21d@*******.com>"]].

HazemElAgaty avatar Nov 11 '18 13:11 HazemElAgaty

There's not much imap can do about that, it's up to the server to match and return the correct emails.

mscdex avatar Nov 11 '18 14:11 mscdex