Ejemplo n.º 1
0
        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());
        }