exchangewebservices

How can I created an Appointment through EWS with a compressed RTF body?

…衆ロ難τιáo~ 提交于 2019-12-11 07:35:49
问题 I would like to create an Appointment through EWS with a compressed RTF body instead of the default HTML format due to several bugs w/ Exchange around HTML formatted appointment bodies. The code I am using looks similar to that below: var appointment = new Appointment(exchangeService); ... string html = // html body string compressedRtf = // converted using Microsoft.Exchange.Data.TextConverters ... var epd = new ExtendedPropertyDefinition(0x1009, MapiPropertyType.Binary); appointment

Exchange API and ASP.NET:the request failed:the remote name could not be resolved:“server name”

做~自己de王妃 提交于 2019-12-11 07:05:18
问题 so when clicking the submit button in my application to create appointment on outlook calling the function SendOutLookAppointment() i get the error on this line appointment.Save(); The request failed. The remote name could not be resolved:'servername' public static void SendOutLookAppointment() { ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010); service.UseDefaultCredentials = false; service.Credentials = new NetworkCredential("admin@test.com.", "password"); service

EWS : Unable to read data from the transport connection: The connection was closed

℡╲_俬逩灬. 提交于 2019-12-11 06:44:02
问题 var message = EmailMessage.Bind(exchangeService, itemid, new PropertySet( ItemSchema.Attachments)); exchangeService.TraceListener=new TraceListener(); exchangeService.TraceEnabled = true; message.Load(new PropertySet(ItemSchema.MimeContent)); // Getting exception here. // File.WriteAllBytes("email.eml", message.MimeContent.Content); I am getting the below exception when trying to load the mime content. Microsoft.Exchange.WebServices.Data.ServiceRequestException occurred HResult=-2146233088

Unable to move Mail items of different Item classes from the same folder using EWS

元气小坏坏 提交于 2019-12-11 06:22:40
问题 EDIT: The cause of this is now known to be because those items are not of the same ItemClass. So if you have a folder that has IPM.Note, IPM.Appointment, IPM.Contact along with messages you will get this problem. So the question is how do you handle this scenario. Original Post below: I have a piece of code that moves items from one folder to another using the EWS API and C#. This is not a duplicate to What is a NullReferenceException, and how do I fix it? as this issue seems to occur within

Microsoft.Exchange.WebServices.Data.Appointment IsOnlineMeeting Set action is invalid for Property

谁都会走 提交于 2019-12-11 04:52:10
问题 Trying to create a calendar event in exchange using the Microsoft.Exchange.WebServices.Data.Appointment. Everything works fine until I set the IsOnlineMeeting property to True. This results in the error "Set action is invalid for Property". In the Appointment object this property is marked as "settable". I'm able to set the IsResponseRequested property to true with no issues. Has anyone experienced this issue before with IsOnlineMeeting property? // Summary: // Gets or sets a value indicating

How to read custom field value

我们两清 提交于 2019-12-11 04:35:35
问题 I am using the below code to read the mails from my inbox using ews. I am able to read Subject etc. But how to read custom field value? ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1); service.Credentials = new NetworkCredential("username", "password", "domain"); service.Url = new Uri("https://server/ews/exchange.asmx"); FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, new ItemView(100)); foreach (Item item in findResults.Items)

TimeZone and Working Hours for Users through EWS

落花浮王杯 提交于 2019-12-11 04:13:12
问题 Is it possible to get TimeZone and working hours of the users through EWS? I am able to extract TZ and Working Hours for current user(Account with which the ExchangeService is initialized) UserConfiguration usrConfig = UserConfiguration.Bind(service, "WorkHours", WellKnownFolderName.Calendar, UserConfigurationProperties.All); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(new MemoryStream(usrConfig.XmlData)); XmlNodeList nlList = xmlDoc.GetElementsByTagName("WorkHoursVersion1"); Console

How to export mail message to EML or MSG file with PowerShell and EWS

旧城冷巷雨未停 提交于 2019-12-11 04:11:50
问题 I'm currently working on a PowerShell script that need to extract all mail messages from a specific mailbox as .eml or .msg files and save them on a backup server. I'm using powershell version 5 with the Exchange 2010 management console module (EWS). Currently, my script is able to access all messages in the inbox folder with their properties such as Body, Subject, attachments and so on. However, I couldn't find an easy way or method to export the messages (with their attachment(s)). So my

sending mails from mail box doesn't save in sent items

亡梦爱人 提交于 2019-12-11 04:08:36
问题 I am using using EWS to read a mailbox 'test@comp.com' and give in service account credentials to log into the exchange. that service account has access to read test@comp.com and even has access to send mails from it. but when I try to send out mails using following code : private static void sendMailviaEWS(String to, String from, String subject, String body, List<String> attname, ExchangeService service) { try { EmailMessage replymessage = new EmailMessage(service); replymessage.setSender

How can I send a multi-part email with text/plain and text/html with Exchange Web Services?

纵然是瞬间 提交于 2019-12-11 04:01:27
问题 I generated a namespace with the wsdl tool via the command line by pointing it to https://exchange-server/EWS/Services.wsdl . I'm able to successfully send emails, using the code below: const string EWS_USERNAME = "user"; const string EWS_PASSWORD = "pass"; const string EWS_DOMAIN = "domain"; const string EWS_URL = "https://exchange-server/EWS/Exchange.asmx"; var ews = new ExchangeServiceBinding(); ews.Credentials = new NetworkCredential(EWS_USERNAME, EWS_PASSWORD, EWS_DOMAIN); ews.Url = EWS