Using IMAP library with Microsoft Exchange.
If I send some emails to the mailbox from an external email account and then use IMAP and access the mails like this (after doing connect and login)
theImap.SelectInbox() 'Find all unseen messages.
uids = theImap.Search(Flag.Unseen)
it is hit any miss if anything get returned, sometimes it works sometimes it doesnt.
I do not have any other client connected to the mailbox.
Having failed to detect new emails, I have proven the emails exist by running with
And all mails are in the mailbox.
How can I reliably detect emails which I have not previously read?