Example #1
0
        public static List <ImapResponse> ExecuteByUid(MailDb mailDb, SelectFolder folder, string args)
        {
            var storeArgs = ParseStoreArgs(args);

            var messages = ImapHelper.GetMessagesByUid(mailDb, folder, storeArgs.Ranges);

            return(ExecuteNew(mailDb, messages, storeArgs.DataItem, storeArgs.Flags, storeArgs.Silent));
        }
Example #2
0
        public static List <ImapResponse> ExecuteByUid(MailDb mailDb, SelectFolder folder, string args)
        {
            var copyArgs = ParseArgs(args);

            var messages = ImapHelper.GetMessagesByUid(mailDb, folder, copyArgs.Ranges);

            return(Execute(mailDb, messages, copyArgs.FolderName));
        }
Example #3
0
        /// <summary>
        /// UID FETCH
        /// </summary>
        public static List <ImapResponse> GenerateByUid(MailDb mailDb, SelectFolder Folder, string Cmd)
        {
            var cmdReader = new CommandReader(Cmd);
            var set       = cmdReader.SequenceSet;
            var range     = GetSequenceRange(set);

            var AllDataItems = cmdReader.ReadAllDataItems();

            var messages = ImapHelper.GetMessagesByUid(mailDb, Folder, range);

            // Auto include UID data item
            if (!AllDataItems.Any(o => o.Name == "UID"))
            {
                AllDataItems.Insert(0, new DataItem
                {
                    Name         = "UID",
                    FullItemName = "UID"
                });
            }

            return(Generate(mailDb, Folder, AllDataItems, messages));
        }