I have only one email in my account but Imap.CurrentFolder.TotalMessageCount gives 6 count why??

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

I have only one email in my account on my mailling server zimbra in Inbox folder.

but my below code gives me count as 6 why??

string strTemp =  "D:\\RahulTemp\\";
Rebex.Licensing.Key = "==Asw8ngRi512lyhFyNlbzu11kO9zWdXn+xvPOqHEeNwTA==";
SslMode _security = SslMode.Implicit;
Imap imap = new Imap();

imap.Connect("mail.iqbackoffice.com", 993, _security);
imap.Login("faxtest5@iqbackoffice.com", "Temp123");
int count = imap.CurrentFolder.TotalMessageCount;
Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Feb 27, 2015 by Pavel Matyska (13,340 points)


Add this line of code before calling imap.Connect(...):

imap.LogWriter = new Rebex.FileLogWriter(@"c:\temp\log.txt", Rebex.LogLevel.Info);

and locate this (or rather similar) line in the log output (R can be different in your case):

Command: R00004 SELECT Inbox

Next line of the log should contain number of messages in your Inbox folder. It should look like this, if it contains one message:

Response: * 1 EXISTS

and when it contains six messages, it should look like this:

Response: * 6 EXISTS

If you have any problem to locate those lines, please send the log to our support mail: support@rebex.net and we'll investigate it further.