exchangewebservices

How to read latest email conversation HTML body from specific email using Microsoft Exchange webservice

旧街凉风 提交于 2020-01-03 05:32:59
问题 I am using EWS to read email body part alone from email of inbox. I need to extract only replied email body instead of whole email body. e.g. ************ A This is good tenant. Regards, Test From:test@gmail.com To: ---- ---------- ---------- Hi User, Data has been populated. Please reply with A or R with comments. Regard Admin. ************ So when I read email body of above email I get the whole body mentioned above. But what I need is only: ************ A This is good tenant. Regards, Test

Accessing other user calendar using service account

大城市里の小女人 提交于 2020-01-03 05:25:09
问题 We are trying to integrate office 365 using EWS managed API's. We have created one service account with impersonation role using office 365 admin center. Now, how can we use that service account to access other user's data(like mails, contacts, calendar) in the application ? Thanks, Rohit 回答1: You create an instance of ExchangeService as usual and then set its ImpersonatedUserId. Sample: var credentials = new WebCredentials( "impersonateduser@your.onmicrosoft.com", "password", ""); var

Download attachments with multiple subjects from Exchange

本秂侑毒 提交于 2020-01-03 04:32:43
问题 I am attempting to download attachments from emails with certain subject lines in an inbox, then delete the email. There are about a dozen different subject lines in total. I want to schedule this process to run every 10 minutes or so, so I'd like to keep any processing overheads to a minimum.. Current script is in PowerShell (based on this), but I'm unsure how I could make it loop through a bunch of different subjects. I could just repeat the whole script for each subject, but it's quite

Can't use EWS UpdateItem operation from Outlook add-in

本小妞迷上赌 提交于 2020-01-02 20:09:12
问题 I'm am trying to update a dictionary element in the IPM.Configuration.OWA.UserOptions message using an UpdateItem via an EWS (SOAP) request from an Outlook web add-in with ReadWriteMailbox permissions. However it is failing with the following error in the response: ErrorAccessDenied: Office extension is not allowed to update this type of item. The UpdateItem request I'm using is a fairly straightforward example of updating a message by it's ID and setting the value of an extended property: <

Exchange Web Services Attachment load is slow

本小妞迷上赌 提交于 2020-01-02 15:01:55
问题 I'm in the process of writing some code to download and process the attachments of email messages and then process them. The code is working as required in some cases, but still has some major problems. Whenever the code loads the attachment into a file on the local disk, it takes a very long time to do so and often times out with the following exception as a result of the slow download: A first chance exception of type 'Microsoft.Exchange.WebServices.Data.ServiceRequestException' occurred in

How can I group individual emails by conversation, so that I know for sure (100%) that one email is in the same conversation as the other?

牧云@^-^@ 提交于 2020-01-02 05:25:19
问题 Question How can I group individual emails by conversation when using the Exchange WebServices API so that I know for sure (100%) that one email is in the same conversation as the other? By individual I mean: I should be able to download 1 email at a time, since when a late response is sent (let's say as a reply to an email from last month), I don't want to bulk-download the whole conversation again, but just that one email to be able to store it in my own database. context I am working on a

Exchange Web Services: Finding emails sent to a recipient

不想你离开。 提交于 2020-01-02 01:21:46
问题 I'm using Exchange Web Services to connect to a mailbox and look for messages matching certain criteria, using FindItems with a SearchFilter. I can get emails in a mailbox filtering on 'from' email address like this: var service = new ExchangeService(ExchangeVersion.Exchange2010_SP1) { TraceEnabled = true, Credentials = new WebCredentials(username, password) }; var filter = new SearchFilter.ContainsSubstring(EmailMessageSchema.From, "some@email.com"); service.FindItems(WellKnownFolderName

Access the voting buttons extended property through Exchange Web Services

谁都会走 提交于 2020-01-01 19:45:09
问题 I'm using the Exchange Web Services (Exchange server 2007) to try to send an email with voting buttons in. I read this question/answer: Send Voting Email I have had a colleague using Outlook 2007 send me an email with simple yes/no voting buttons (the buttons display in Outlook, I have not sent an answer) and I can confirm that it is the first email in my Inbox. I've then used the EWS to get that email and try to get the extended properties relating to the email, so I can get the binary

Access CustomProperties set using office365 JS APIs from EWS or REST API

烂漫一生 提交于 2020-01-01 12:33:13
问题 I have an office 365 mail app that stores a value in a custom property before the item is saved. When the item is saved I want to access this property using a server-side application. Reading through the custom properties documentation tells me I can't access custom properties created using the JS API using any other service like EWS since these are not MAPI properties. Are there any workarounds ? Is it possible to access these using REST APIs ? 回答1: Actually, it is documented where they are

EWS managed API - Appointment with Html Body and Outlook 2013

人走茶凉 提交于 2019-12-31 03:43:14
问题 I'm trying to create an Appointment with an Html Body containing a Hyperlink, like it is shown in this Example: ewsAppointment = new EwsData.Appointment(service); ewsAppointment.Subject = "Test"; var element = new XElement("html", new XElement("body", new XElement("p", new XElement("a", new XAttribute("href", "http://www.google.it/"), "google")), new XElement("p", "test 2")))); ewsAppointment.Body.BodyType = EwsData.BodyType.HTML; ewsAppointment.Body = element.ToString(); ewsAppointment.Save