Aspose.Email.Examples.CSharp.Email.Exchange.FindConversationsOnExchangeServer.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            const string mailboxUri = "https://exchange/ews/exchange.asmx";
            const string domain = @"";
            const string username = @"[email protected]";
            const string password = @"password";
            NetworkCredential credentials = new NetworkCredential(username, password, domain);
            IEWSClient client = EWSClient.GetEWSClient(mailboxUri, credentials);
            Console.WriteLine("Connected to Exchange 2010"); 
            // ExStart:FindConversationsOnExchangeServer
            // Find Conversation Items in the Inbox folder
            ExchangeConversation[] conversations = client.FindConversations(client.MailboxInfo.InboxUri);
            // Show all conversations
            foreach (ExchangeConversation conversation in conversations)
            {
                // Display conversation properties like Id and Topic
                Console.WriteLine("Topic: " + conversation.ConversationTopic);
                Console.WriteLine("Flag Status: " + conversation.FlagStatus.ToString());
                Console.WriteLine();
            }
            // ExEnd:FindConversationsOnExchangeServer
        }
    }
FindConversationsOnExchangeServer