Example #1
0
        public List <ImapMessageRec> LookupMessages(ImapConnection imapConnection, List <uint> uidList)
        {
            this.SelectImapFolder(imapConnection);
            LookupMessagesParams         lookupParams = new LookupMessagesParams(uidList);
            IEnumerable <ImapMessageRec> collection   = this.LookupMessagesInfoFromImapServer(imapConnection, lookupParams);
            List <ImapMessageRec>        list         = new List <ImapMessageRec>(collection);

            list.Sort();
            return(list);
        }
Example #2
0
        private IEnumerable <ImapMessageRec> LookupMessagesInfoFromImapServer(ImapConnection imapConnection, LookupMessagesParams lookupParams)
        {
            ImapResultData messageInfoByRange = imapConnection.GetMessageInfoByRange(lookupParams.GetUidFetchString(), null, lookupParams.FetchMessagesFlags.HasFlag(FetchMessagesFlags.FetchByUid), lookupParams.FetchMessagesFlags.HasFlag(FetchMessagesFlags.IncludeExtendedData) ? ImapConnection.MessageInfoDataItemsForNewMessages : ImapConnection.MessageInfoDataItemsForChangesOnly);

            return(this.GetImapMessageRecsFromResultData(messageInfoByRange, lookupParams.FetchMessagesFlags));
        }