0 votes
by (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");
imap.SelectFolder("INBOX");
int count = imap.CurrentFolder.TotalMessageCount;
Applies to: Rebex Secure Mail

1 Answer

0 votes
by (15.2k points)

Hi,

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.

...