Hello,
I have an mailbox account on Business Gmail and I receive messages using IMAP.
Also, for receiving new messages I store the maxReceivedUID, in order to receive only new UIDs every time.
Code
List uids = imap.Search().Where(Expression.UID(Range.From(maxReceivedUID)));
I have an issue with this and I will try to explain it.
The stored value of maxReceivedUID is 2601. This value is incorrect, and it should be 790 (because that was the UID value of last received message) but by mistake I stored wrong UID.
If I have a new message (with UID 791) then I expect to returns nothing because I ask with greater value on UID From (2601).
List<long> uids = imap.Search().Where(Expression.UID(Range.From(2601)));
But code returns UID value 790.
First question: Why returns 790 even if I asked with greater value?
Second question: Why the return value was not 791? If i try to receive message data with UID 791, then I get them (proves that message UID 791 exists)
imap.GetMessageByUID(791);
Every time that I try to receive new messages with the previous code, I get the same result. But if I have a new message (with UID 792), then the same code returns UID 792.
Could you please help me?