+2 votes

For each folder, largestUID is different right?
for e.g Inbox 557, Draft 402, Folder-1 301

So do we need to save folder wise largestUID ? As in below link


internal class LastRun
    public long UIDValidtiy { get; set; }
    public long LargestUID { get; set; }

mentioned about the above object and in this object, there is no folder name added so I want to know how we can manage folder wise?


1 Answer

0 votes

In most cases new emails arrive to INBOX only, the sample you are referring to is checking this folder only.

If you need to check other folders you need to save: folder name, folder's UIDValidtiy and Largest UID for all folders you want to monitor.

Please note that server may use same UIDs in different folders

You can find more detail on UIDs here:

by (279k points)
I Understood, Thanks.

In below url there are two variable.

LastRun last and long largestUID. what is the difference between both? can't we use last.LargestUID instead of largestUID?
There was a minor typo in the 2nd set of examples - use last.LargestUID.