THE SOLUTION!
i edited the 2nd lib so i can give it a string as folder name, and VOILA! works like a charm!! wohoo!!, only problem is with non-SSL mails that when there is no unread mails it gives error thats why i have the try catch around search message
Code:
l.Login(server, user, pass, ssl);
l.SelectFolder("INBOX");
System.Collections.ArrayList list = new System.Collections.ArrayList();
int mails = 0;
try { l.SearchMessage(new string[] { "unseen" }, false, list); }
catch{}
mails = list.Count - 1;
l.LogOut();
return mails;
Comment