0

I want to send the command 'UID FETCH ALL'. This gives me all the uids for this folder. I can't find any predefined method for this command.

I want to retrieve the headers of the emails in an imapfolder and save them to a local datastore with their UID so the next time, I can fetch all the UIDs, discard the ones smaller then the highest UID in my datastore and start retrieving those headers. Additionally I can compare the range of UIDs in my datastore with the list retrieved by the command and check if any UIDs failed to be persisted to my local datastore en try to receive them again. (Assume checking of the UIDs is in conjunction with UIDValidity).

I use this strategy to be sure all headers are in my local datastore (or my logging tells me which UID I can not retrieve/persist) If there is another (possible better) strategy to accomplish this with MailKit please point me in the right direction.

Update: Found a solution. Use 'inbox.Fetch(0, -1, MessageSummaryItems.UniqueId)'

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

1

Found a solution. Use 'inbox.Fetch(0, -1, MessageSummaryItems.UniqueId)'