+2 votes

I'm using the Limilabs Mail.dll in order to display in a listview the inbox mail. I have the necessity to go in and out about 50 mail address to check the seen/unseen mail. It's will be displayed into an listview box.

My problem is that the new mail on Inbox where detected with flag count at zero, but if I use the webmail service (aruba) the new mail is in bold (unseen).

by

1 Answer

0 votes
 
Best answer

To get only unseen emails use this code:

List<long> uids = imap.Search(Flag.Unseen);

Please remember that lack of the \SEEN flag (Flag.Seen in Flags collection) means that the message is unseen.

Flag.Unseen is only used in searches and is equivalent to NOT \SEEN. It is simple an IMAP search shorthand.

by (301k points)
...