Ejemplo n.º 1
0
        public static void Run()
        {
            // ExStart:ProcessExchangeTasksUsingIEWSClient
            // Create instance of EWSClient class by giving credentials
            IEWSClient client = EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "testUser", "pwd", "domain");

            // Create Exchange task object
            ExchangeTask task = new ExchangeTask();

            // Set task subject and status to In progress
            task.Subject = "New-Test";
            task.Status  = ExchangeTaskStatus.InProgress;
            client.CreateTask(client.MailboxInfo.TasksUri, task);
            // ExEnd:ProcessExchangeTasksUsingIEWSClient
        }
        public static void Run()
        {
            // Create instance of EWSClient class by giving credentials
            IEWSClient client = EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "testUser", "pwd", "domain");

            // Create Exchange task object
            ExchangeTask task = new ExchangeTask();

            // Set task subject
            task.Subject = "New-Test";

            // Set task status to In progress
            task.Status = ExchangeTaskStatus.InProgress;

            // Create task on exchange
            client.CreateTask(client.MailboxInfo.TasksUri, task);

            Console.WriteLine(Environment.NewLine + "Task created on Exchange Server successfully.");
        }