exchangewebservices

Validate login credentials using EWS Managed API

我的未来我决定 提交于 2019-11-27 03:39:58
问题 Is there a way to validate login credentials provided by a user using EWS Managed API without sending an email. I am using AutodiscoverUrl method on an [ExchangeService] object but it takes too long? Any suggestion would be appreciate it. try { ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1); service.Credentials = new WebCredentials("xxxx@yyy.com", "password"); service.AutodiscoverUrl("xxxx@yyy.com", RedirectionUrlValidationCallback); Console.WriteLine(

Exchange web services: why is ItemId not constant? [continued]

放肆的年华 提交于 2019-11-27 02:50:06
问题 as some others have discuss this problem before (e.g., Exchange web services: why is ItemId not constant?), I want to talk about the solution, I have done what people have suggested by stamping the Guid as an extended property, For me this solution is kind of nice (although I do not know how to make it work with the occurrences) but only as long as the application works, once the application restarts the extended properties of the items disappear, so my problem now, is “ How to stamp the

Fetching all mails in Inbox from Exchange Web Services Managed API and storing them as a .eml files

与世无争的帅哥 提交于 2019-11-27 02:44:01
问题 I want to fetch all mails in the Inbox folder using EWS Managed API and store them as .eml . The problem is in fetching (1) all mails with (2) all headers (like from, to, subject) (I am keeping information of those values of from , to and other properties somewhere else, so I need them too) and (3)byte[] EmailMessage.MimeContent.Content . Actually I am lacking understanding of Microsoft.Exchange.WebServices.Data.ItemView , Microsoft.Exchange.WebServices.Data.BasePropertySet and Microsoft

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

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

EWS - Access All Shared Calendars

房东的猫 提交于 2019-11-26 19:06:58
I've got the following code: private void ListCalendarFolders(ref List<EBCalendar> items, int offset) { var pageSize = 100; var view = new FolderView(pageSize, offset, OffsetBasePoint.Beginning); view.PropertySet = new PropertySet(BasePropertySet.FirstClassProperties); view.PropertySet.Add(FolderSchema.DisplayName); view.PropertySet.Add(FolderSchema.EffectiveRights); view.Traversal = FolderTraversal.Deep; FindFoldersResults findFolderResults = service.FindFolders(WellKnownFolderName.MsgFolderRoot, view); foreach (Folder myFolder in findFolderResults.Folders) { if (myFolder is CalendarFolder) {

EWS body plain text

允我心安 提交于 2019-11-26 16:06:18
问题 I use EWS to get exchange emails, but how can i get plain text from email body, without html? Now i use this: EmailMessage item = (EmailMessage)outbox.Items[i]; item.Load(); item.Body.Text 回答1: In the PropertySet of your item you need to set the RequestedBodyType to BodyType.Text. Here's an example: PropertySet itempropertyset = new PropertySet(BasePropertySet.FirstClassProperties); itempropertyset.RequestedBodyType = BodyType.Text; ItemView itemview = new ItemView(1000); itemview.PropertySet