Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best strategy to avoid to download all readed emails
(01-05-2022, 07:01 PM)rlebeau Wrote: Make sure RetrieveOnSelect is set to rsDisabled, so you can decide what you want to download and when.  You can then use (UID)SearchMailBox() to search for just skUnseen/skNew messages and retrieve their IDs, then you can download the headers/bodies for just those IDs as needed.

Ok, now i can read only new emails without wasting time howewer now, all emails I have found are automatically marked as readed but is not what I wont.

I need to read by software all new emails but mark readed only those email that match with some criteria like specific words on the Object of email or email that have specific attachments.

How I can mark as readed some emails and leave others untouched because they need to be read by others?

(01-05-2022, 07:01 PM)rlebeau Wrote: Technically, a better solution is to use the IMAP IDLE command to let the IMAP server notify you in real-time whenever new emails arrive, instead of you having to poll for them periodically.  However, TIdIMAP4 does not support that command yet (it is on the TODO list), but you could try implementing it yourself, if you want.

unfortunately, I don't have the skills Sad

I think I found the solution:

I can use RetrievePeek that not automatically mark the emails as readed and I can use StoreFlags to mark by software the emails that I worked.

Messages In This Thread
RE: Best strategy to avoid to download all readed emails - by luigisic - 01-06-2022, 06:39 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)