exchangewebservices

EWS SearchFilter.ContainsSubstring to filter on Sender Email Address

不想你离开。 提交于 2019-12-05 21:18:08
I'm trying to filter emails on Exchange Web Services using SearchFilter.ContainsSubstring as follows: sfilter = New SearchFilter.ContainsSubstring(EmailMessageSchema.Sender, EmailAddress, ContainmentMode.Substring, ComparisonMode.IgnoreCase) MailItems = service.FindItems(Folder.Id, sfilter, view) Unfortunately this doesn't work, and I don't want to use Queries, because I can't guarantee that I can use features of Exchange Server 2013. Composing a variety of requests in Fiddler, I can observe that if I remove the last character of the email address, then the filter works, remove the first

UseDefaultCredentials with Exchange Web Services

删除回忆录丶 提交于 2019-12-05 21:14:59
I'm a pretty new programmer. One of the things I've been tasked with at work is getting our custom tools to create draft emails and drop them into the draft email folder of the user running the tool. We presently use Exchange Server 2010 (but are in the process of migrating over to Exchange Online). This link talks about a UseDefaultCredentials but I can't seem to work out how to implement it. I created an ExchangeService object called service and managed to interact with our Exchange server using this for credentials: service.Credentials = new WebCredentials("my login name", "my password"); I

Can we connect to Exchange 2016 using EWS Managed API?

删除回忆录丶 提交于 2019-12-05 21:09:49
问题 I am using EWS Managed API 2.2 and it does not show the Exchange version 2016 in its enumeration. I can see the versions upto Exchange 2013. So how can I connect to Exchange Server 2016? Is the API, yet to be updated from Microsoft or do I need to use any other API's to connect to Exchange 2016 ? 回答1: It will connect just fine. You don't need to set the version to match the server, you set the version to indicate the lowest level of service you support. 来源: https://stackoverflow.com/questions

Is there a way to determine if a email is a reply/response using ews c#?

戏子无情 提交于 2019-12-05 17:28:38
问题 I am writing a support system and this is my first time using EWS. Thus far I have been quite successful with it. I can extract the info I need. Send emaisl and everything is working great. I do have one small headache. Is there a way to tell if an email is in fact a reply ? The basic idea of the app is someone sends an email. We reply and give them a reference number. This is done and working great. Now if they reply to this same address, we need to log it a bit different in our database.

Accessing a Resource Calendar with no mailbox via EWS and C#

落爺英雄遲暮 提交于 2019-12-05 14:51:31
Our Exchange Admins (Exchange 2010 SP1) have setup a shared resource calendar. There is no mailbox assigned to this resource calendar . I want to be able to read the meetings using EWS and C#. Snippet: ExchangeService esvc = new ExchangeService(ExchangeVersion.Exchange2010); esvc.Credentials = new WebCredentials(username, password, "ourplace.org"); esvc.Url = new Uri("https://OWA.OURPLACE.ORG/EWS/Exchange.asmx"); FolderId shareFolderId = new FolderId(WellKnownFolderName.Calendar, "Shared Calendar Name"); CalendarFolder.Bind(esvc, shareFolderId); the bind statement throws the error: "The SMTP

Match EWS Conversation* to Outlook Add-in Conversation*

懵懂的女人 提交于 2019-12-05 12:48:29
I wrote an add-in for Outlook years ago that adds entries to a database based on the Item's ConversationIndex / ConversationId properties. This works great and remains uniform across all clients interacting with the messages (e.g. "Bob" can see that "Mary" already processed this message because an entry with the ConversationIndex already exists). I'm now trying to move this piece to a service (and connect via the EWS API) but I'm not having good luck matching these properties with the values coming from Outlook. For example: The Outlook Add-In will give me the following values for a specific

EWS API - Create calendar and share with reviewer permissions

假装没事ソ 提交于 2019-12-05 12:10:55
I'm having some trouble on creating and share a calendar with review permissions using Exchange Webservice API .NET . At the moment this is my code: Folder addCalendar = new Folder(service); addCalendar.DisplayName = name; addCalendar.FolderClass = "IPF.Appointment"; var perm = new FolderPermission(new UserId("reviewer@test.com"), FolderPermissionLevel.Reviewer); addCalendar.Permissions.Add(perm); addCalendar.Save(WellKnownFolderName.MsgFolderRoot); The calendar is created, in my account I can see the calendar and the user 'reviewer@test.com' has the correct permissions. The problem is: The

The Autodiscover service couldn't be located

倾然丶 夕夏残阳落幕 提交于 2019-12-05 11:29:18
I have code to send email using Exchange Web Services (EWS 1.1 API). There is no exception if I use the hardcoded parameter values, like: service.AutodiscoverUrl("me@mydomain.com", delegate { return true; }); But If I try to use a variable then I am getting error while discovering URL, "The Autodiscover service couldn't be located". string userName = "me@mydomain.com"; service.AutodiscoverUrl(userName, delegate { return true; }); Is there any way to use variables with autodiscoverurl method? What am I doing wrong? Sanjay Henning Krause It's very unlikely that this is causing the problem.

How to authenticate with OAuth to access EWS APIs

帅比萌擦擦* 提交于 2019-12-05 11:10:44
My web service is currently doing basic username/password authentication in order to subscribe the exchange user for receiving the events (like new mail event etc) like below: var service = new ExchangeService(exchangeVersion) { KeepAlive = true, Url = new Uri("some autodiscovery url"), Credentials = new NetworkCredential(username, password) }; var subscription = service.SubscribeToPushNotifications( new[] { inboxFolderFoldeID }, new Uri("some post back url"), 15, null, EventType.NewMail, EventType.Created, EventType.Deleted, EventType.Modified, EventType.Moved, EventType.Copied); Now, I am

Mapping Office365 REST Calendar IDs to EWS CalendarItem IDs

烈酒焚心 提交于 2019-12-05 10:39:09
问题 Using Exchange push notifications I've been creating a service that syncs over calendar data from Office365 users. I've been using a combination of the Office365 Calendar REST API (to get and manage calendars) and the EWS API (to subscribe to calendar changes). I noticed that just recently MS has introduced a preview API for their subscription endpoints. However, this API is still in preview mode and I'd like to avoid using it for the time being. Once I have everything setup, the problem is I