Does calling SyncFolderItems in a loop (until MoreChangesAvailable is false) return items that have been received after my first call to SyncFolderItems?
For example, say I have 1,000 items in my mailbox and I make a call to SyncFolderItems with no sync state. After my first call to SyncFolderItems I receive an item will it include a new email I receive after I first call SyncFolderItems?
Each call to
SyncFolderItemswill respond withSyncStatewhich is a hash of the timestamp and item index (if > 512 items) since the last synchronization call. When you call theSyncFolderItemsagain, you need to include the lastSyncStateto ensure you only get new items since your last synchronization point.If you have more than 512 items in the folder – you need to call
SyncFolderItemsagain with the newSyncState.Here is a sample post using EWS Managed API.