private List <int> GetMailIndex(IMailClient client, string searchCriteria, string mailbox) { IEnumerable <int> strMsgIds = null; string mailIndexs = string.Empty; if (string.IsNullOrWhiteSpace(searchCriteria)) { mailIndexs = client.GetAllMessagesFlag(out strMsgIds, mailbox); } else { mailIndexs = client.SearchMail(searchCriteria, out strMsgIds, mailbox); } return(strMsgIds.ToList()); }
private List<int> GetMailIndex(IMailClient client, string mailbox) { MailFlag flag = MailFlag.All; switch (MailStatus) { case 1: flag = MailFlag.All; break; case 2: flag = MailFlag.Seen; break; case 3: flag = MailFlag.Unseen; break; } IEnumerable<int> strMsgIds = null; string mailIndexs = client.GetAllMessagesFlag(flag, out strMsgIds, mailbox); return (strMsgIds.ToList()); }