0 votes

Hi,
I have one problem. I downloaded the mails using limilab library. So we have a desktop search, where user can search for any mail.

So lets say he deleted some mails from gmail account in browser, and search in our desktop search, it is showing the deleted mails. So is there a way to check if particular messageid or threadid is exists in the server then only we can show the results. If that is possible then won't it slow down the search process.

Consider a situation where there are 1000 of results came, So shall I check if those mails are exists for all 1000 mails?

If you have any solution please let me know.

Thanks,
Sarathi

by

1 Answer

0 votes

You'll need to perform a search for those message uids/message-ids/thread-ids if you want 100% reliable results.

If you are using Gmail easiest would be to use "Gmail message id" (X-GM-MSGID):

Obtain Gmail message id:
https://www.limilabs.com/blog/get-gmail-message-id

Search for specific Gmail message id:
https://www.limilabs.com/blog/search-gmail-message-id

The other solution would be to track deleted messages - from time to time you'd have to ask the server for all messages:
https://www.limilabs.com/blog/get-email-information-from-imap-fast
and remove entires for those that are not returned.

Maybe you can assume, that user is more likely to delete recent messages, then messages that are several months old.

by (276k points)
edited by
...