I added the line in my code that you told me to do so

0 votes
asked Feb 27, 2015 by rockyshah2015 (750 points)

Yes I got the following line in my log as follows

2015-02-27 18:14:30.675 INFO Imap(1)[1] Command: R00004 SELECT Inbox
2015-02-27 18:14:31.206 INFO Imap(1)[1] Response: * 5 EXISTS

but my inbox has only one email then why the count is showing 5???

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Feb 27, 2015 by Pavel Matyska (15,060 points)
edited Mar 22, 2016 by Tomas Knopp

Hi, as you can see your server reports that it has 5 messages.
So, this is not a question to us, but to your IMAP server you are using (the one you see only one message in). The component only exposes the values given from the server.

However, I have an idea why your server reports you only one message. Maybe, other messages you are not expecting are flagged as deleted.
You can list those message with the following code (SelectFolder is for reference into your code) and see if any has Deleted in the last column of the Console.WriteLine call:


var list = imap.GetMessageList();
foreach (var info in list)
    Console.WriteLine("{0} | {1} | {2} | {3} | {4} | {5}", 
        info.Subject, info.From, info.To, info.Date, info.ReceivedDate, info.Flags);

If you want those messages flagged as 'Deleted' delete permanently, you can call this line of code: