ews-managed-api

How can I detect if this dictionary key exists in C#?

落花浮王杯 提交于 2019-11-27 16:54:02
I am working with the Exchange Web Services Managed API, with contact data. I have the following code, which is functional , but not ideal: foreach (Contact c in contactList) { string openItemUrl = "https://" + service.Url.Host + "/owa/" + c.WebClientReadFormQueryString; row = table.NewRow(); row["FileAs"] = c.FileAs; row["GivenName"] = c.GivenName; row["Surname"] = c.Surname; row["CompanyName"] = c.CompanyName; row["Link"] = openItemUrl; //home address try { row["HomeStreet"] = c.PhysicalAddresses[PhysicalAddressKey.Home].Street.ToString(); } catch (Exception e) { } try { row["HomeCity"] = c

Error when I try to read/update the .Body of a Task via EWS Managed API - “You must load or assign this property before you can read its value.”

时间秒杀一切 提交于 2019-11-27 13:29:03
问题 I am using the Exchange Web Services Managed API to work with Tasks (Exchange 2007 SP1). I can create them fine. However, when I try to do updates, it works for all of the fields except for the .Body field. Whenever I try to access (read/update) that field, it gives the following error: "You must load or assign this property before you can read its value." The code I am using looks like this: //impersonate the person whose tasks you want to read Me.Impersonate(userName); //home-made function

EWS: Retrieving attachments from signed emails

徘徊边缘 提交于 2019-11-27 07:04:23
问题 I have a C# program that manages a resource mailbox by retrieving attachments and categorizing emails into sub-folders. An issue came up recently where the client wishes to send us signed emails, so when the program retrieves their attachments a file named "smime.p7m" is saved instead of the file attachments. This file is not present when reviewing the email in Outlook, only the attachments we want. However, when stepping through the code, the attachments listed in the Email object only

Exchange Web Services (EWS) API “To” header for alias

隐身守侯 提交于 2019-11-27 06:06:31
问题 I have an inbox set up in exchange, hello@mycompany.com Additionally, there is an alias for this, news@mycompany.com , so all emails to the news address end up in the hello inbox. Ideally, I want to be able to tell which alias an email has been sent to, using EWS. When I send an email to news@mycompany.com , and examine the Internet headers of the message using Microsoft Outlook, the To: header reads To: Hello <news@mycompany.com> which is exactly what I want to see. However, using EWS, when

Creating Tasks for other users using Exchange Web Services (EWS) Managed API

房东的猫 提交于 2019-11-27 01:29:13
问题 As an "EWS Managed API Newbie", I'm having some problems finding examples and documentation about creating and managing Tasks. I've managed to create a task for myself without a problem. However, I really need to be able to do the following - if anyone could give me any pointers I'd really appreciate it... Create a Task and assign it to another user. Be able to interrogate the status of that task (percent complete, etc) whilst it is assigned to that user. Update the notes on the task at any

Save mail to msg file using EWS API

雨燕双飞 提交于 2019-11-27 01:19:01
I'm using Exchange Web Services Managed API 1.1 to connect to Exchange server 2010 and then find out new emails received. Now I want to save a copy of the .msg file to a folder on the disk. I do not want to use any paid third party to integrate. Any help will be appreciated. Colin Pickard If you are happy to save into the .eml format instead, it can be done very easily just using EWS and no third party libraries. The .eml file will contain all the same information and can be opened by Outlook in the same way as .msg (and also by other programs). message.Load(new PropertySet(ItemSchema

How can I detect if this dictionary key exists in C#?

别等时光非礼了梦想. 提交于 2019-11-26 22:29:39
问题 I am working with the Exchange Web Services Managed API, with contact data. I have the following code, which is functional , but not ideal: foreach (Contact c in contactList) { string openItemUrl = "https://" + service.Url.Host + "/owa/" + c.WebClientReadFormQueryString; row = table.NewRow(); row["FileAs"] = c.FileAs; row["GivenName"] = c.GivenName; row["Surname"] = c.Surname; row["CompanyName"] = c.CompanyName; row["Link"] = openItemUrl; //home address try { row["HomeStreet"] = c