예제 #1
0
        public void MoveProcessedMessage(EmailMessage message)
        {
            ExchangeService    service       = EWSServerInfo.GetExchangeProxy();
            FindFoldersResults folderResults = service.FindFolders(WellKnownFolderName.Inbox, new FolderView(int.MaxValue));

            message.IsRead = true;
            message.Update(ConflictResolutionMode.AlwaysOverwrite);
            message.Move(folderResults.Folders[0].Id);
        }
예제 #2
0
        public IList <EmailMessage> GetEmployeeSubmittedTaskMessages(int numberOfViewItems, string user, string password, string domain, string autoDiscoverURL)
        {
            ExchangeService service = EWSServerInfo.GetExchangeProxy(user, password, domain, autoDiscoverURL);

            ItemView                view        = new ItemView(numberOfViewItems);
            IList <EmailMessage>    messages    = new List <EmailMessage>();
            FindItemsResults <Item> findResults = service.FindItems(WellKnownFolderName.Inbox, view);

            foreach (Item item in findResults.Items)
            {
                EmailMessage message = EmailMessage.Bind(service, item.Id);
                messages.Add(message);
            }
            return(messages);
        }
예제 #3
0
        public IList <EmailMessage> GetSupportMessages(int numberOfViewItems)
        {
            ExchangeService service = EWSServerInfo.GetExchangeProxy();

            ItemView                view        = new ItemView(numberOfViewItems);
            IList <EmailMessage>    messages    = new List <EmailMessage>();
            FindItemsResults <Item> findResults = service.FindItems(WellKnownFolderName.Inbox, view);

            foreach (Item item in findResults.Items)
            {
                EmailMessage message = EmailMessage.Bind(service, item.Id);
                messages.Add(message);
            }
            return(messages);
        }