When I call NewSet() as:
string newSet = inbox.SearchClient.NewSet() it returns null. When I open the mailbox in Outlook Web Client it shows two new messages. Here is the log:
[ 16:38:02.330 ]---- aspNetIMAP 1.8.0.0 {Tuesday, March 19, 2013} -----
[ 16:38:02.330 ]---- aspNetMime 2.8.0.0 -----
[ 16:38:02.330 ]Setting socket timeout to 20000ms.
[ 16:38:02.345 ]Attempting connection to xxx.xxx.xxxx at port 143
[ 16:38:02.347 ]No LocalEndPoint set.
[ 16:38:02.365 ]Server xxx.xxx.xxxx is not an IP address. Performing DNS resolution.
[ 16:38:02.367 ]Server xxx.xxx.xxxx resolved to IP address 10.50.4.220
[ 16:38:02.371 ](No proxy used.)
[ 16:38:02.375 ]* OK The Microsoft Exchange IMAP4 service is ready.
[ 16:38:02.376 ]Connected to xxx.xxx.xxxx
[ 16:38:02.391 ]55205445 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS CHILDREN IDLE NAMESPACE LITERAL+ 55205445 OK CAPABILITY completed.
[ 16:38:04.239 ]41168525 LOGIN "**********" "**********"
41168525 OK LOGIN completed.
[ 16:38:05.413 ]13500384 SELECT "inbox"
* 4904 EXISTS
* 0 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
* OK [UNSEEN 4903] Is the first unseen message
* OK [UIDVALIDITY 295304] UIDVALIDITY value
* OK [UIDNEXT 5911] The next unique identifier value
13500384 OK [READ-WRITE] SELECT completed.
[ 16:38:06.565 ]83056330 SEARCH new
* SEARCH
83056330 OK SEARCH completed.
|