Menu
  • HOME
  • TAGS

EWS API calendar - Impersonating to update raise an error “Access is denied. Check credentials and try again.”

calendar,exchangewebservices,ews-managed-api

Found the solution: Only adding impersonated ID to the existing service instance doesn't work. You also need to re-validate the auto-discover url....

Microsoft.Exchange.WebServices.Data.ServiceResponseException : The specified folder could not be found in the store

exchange-server,ews,office365,exchangewebservices

Answer From Glen Scales : The WellKnowFolderEnum only works if the folder was created via the Lync 2013 client if the Mailbox is old and has been using older lync clients then you need to search for the folder via name eg see https://msdn.microsoft.com/en-us/library/office/hh243707%28v=office.14%29.aspx . Generally you want to use...

How do I trigger a subscription error to test recovery on exchange web service

c#,testing,ews,exchangewebservices

I logged a call with Microsoft to find out if it was possible. The short answer is no you can't trigger the OnSubscriptionError event. Here are the email responses from MS: In answer to your question, I don’t believe that there is a way you can trigger the OnSubscriptionError event....

How do I get the itemID for a contact given I have an calendar appointment?

c#,exchangewebservices,ews-managed-api,exchange-server-2013

The contacts your code works with are personal contacts (the ones stored in the user's Contacts folder in their mailbox). I point this out because only attendees for which the user actually has a contact will work with this method. That being said, you should be able to use ResolveNames...

Microsoft Exchange: How to get AD domain via EWS?

c#,active-directory,exchangewebservices

I don't quite understand what you mean: But if I have multiple trusted GCs, and the user that is querying AD is in a different GC than the user queried, the object cannot be found in the global catalog, because I did not provide the AD domain to search in....

How to cache Exchange web service API autodiscoverurl?

c#,asp.net,caching,exchangewebservices

I would suggest you cache the minimum information your app needs to function. This page suggests Autodiscover endpoint EWS URL and any other settings retrieved from the Autodiscover response ...

Grails: RESTful web services data processing in different format

web-services,rest,grails,exchangewebservices,groovyws

Grails has withFormat feature. You can render different responses based on the incoming request Accept header, format parameter or URI extension. Your code would like: def able_Webservice = { ableService.populateAbleBean(ableBean); ableService.settingWhereClause(ableBean); ableService.getDBData(ableBean); def data = ableService.webservice_Data(ableBean); withFormat { xml { render data as XML } json { render data as...

Connet to right custom Exchange server

c++,authentication,wsdl,exchangewebservices,gsoap

I found that for custom exchange server location(end point) i have to manually change the soap_endpoint = "https://example.com/service.aspx" or if not, then i can set it to NULL for take the end-point location from WSDL file.

Error trying to send mail. Not sending using EWS

c#,ews,exchangewebservices

This is how I got all my unread emails SearchFilter sf = new SearchFilter.SearchFilterCollection(LogicalOperator.And, new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false)); ItemView view = new ItemView(int.MaxValue); FindItemsResults<Item> findResults = emailService.FindItems(WellKnownFolderName.Inbox, sf, view); foreach (EmailMessage email in findResults) {} Note that I got them as a "EmailMessage" But were never able to get the senders...

Integration with the exchange server: propose new time for the appointment

c#,outlook,exchange-server,ews,exchangewebservices

EWS Managed API doesn't have support for "Propose new time" functionality. But please take a look at this article, to see how to implement it using the underlying EWS SOAP APIs.

EWS: Same public folder has different UniqueIDs per user?

exchange-server,ews,exchangewebservices

I'd suggest you use the PR_SOURCE_KEY Extended property instead https://msdn.microsoft.com/en-us/library/ee178895(v=exchg.80).aspx this will always be consistent on public folders and you can also use that property in MAPI to access the folder in an Outlook Plugin Cheers Glen...

Microsoft Exchange WebService Contact Email Addresses formatting

asp.net-mvc,outlook,exchangewebservices

This is the actual email address of type "EX" (as opposed to "SMTP"). Did you add a GAL user to the Contacts folder? You will need the Email1OriginalDisplayName property (DASL name http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/8084001F). You should be able to retrieve it using EWS. Take a look at the contact with OutlookSpy (click...

Exchange Web Services Managed API: is it possible to have an Item other than EmailMessage in the mail folder?

.net,exchange-server,ews,exchangewebservices

Sure, assuming you have an item of that type in the inbox. For example, using Outlook, you can create a new Post in your Inbox. That would be a PostItem in the Managed API.

Exchange Server 2013 EMail Driver

c#,exchange-server,ews,exchangewebservices,exchange-server-2013

Finally found the problem: There was a load balancer between exchange server and my server. I'm bridging this load balancer now -> Works perfectly...

Exchange Online push notification subscription unable to perpetuate

exchange-server,exchangewebservices

Exchange will "lose" subscriptions on a fairly regular basis, especially in the O365 environment because mailboxes are continually being shuffled onto different servers in order to load balance the entire ecosystem. Even in an on-prem Exchange you can lose subscription if a CAS restarts. Unfortunately to build a reliable app,...

Microsoft.Exchange.WebServices.Data.ServiceResponseException: When Sending Emails

email,ews,exchangewebservices

It turns out that for the mail Server (MS Exchange) in question I needed to use this method: Writing an encrypted mail via Exchange Web Services var item = new EmailMessage(service); item.MimeContent = new MimeContent(Encoding.ASCII.HeaderName, content); // Set recipient infos, etc. item.Send(); It seems to be because of the encrypyed...

Need change message properties (subject etc.) in read scenario

office365,exchangewebservices

Client credential flow requires you to use a certificate rather than a client ID/secret combo. You can use a self-signed certificate as long as you upload it to your app registration manifest. See http://blogs.msdn.com/b/exchangedev/archive/2015/01/21/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx for details.

EWS FindItem call returns incorrect EffectiveRights values

exchange-server,ews,exchangewebservices,ewsjavaapi

FindItems loads values from the contents table of a folder, rather than from the items themselves. Many times, with computed properties like EffectiveRights, a simplistic approach is used to populate the table to give an approximation. It seems like that's what's happening here. The comment in your code mentions that...

Error message “The Id has an invalid format” when setting Start datetime object

c#,ews,exchangewebservices

This is the signature of the method you are using to extract the date public static DateTime ParseExact( string s, string format, IFormatProvider provider ) It could throw a FormatException if s or format is an empty string s does not contain a date and time that corresponds to the...

How to use C++ with gsoap to read email from outlook using exchange web services

c++,authentication,office365,exchangewebservices,gsoap

Or you could use Office 365 REST APIs for Mail, Calendar and Contacts. Check out http://dev.outlook.com for more info.

Can't get Contact ID from EMAILBOX Object

exchange-server,exchangewebservices,exchange-server-2007,stackexchange-api

The Id only gets returned if the Contact is located in the users Contacts folder. For Global Address List objects that are returned the Id will always be null because you can't do any further operations on these objects (eg you can do a GetItem on GAL Contacts). The only...

EWS Get organizer email from GetUserAvailabilityRequest

xml,soap,exchange-server,ews,exchangewebservices

With the ItemId your trying to use that is the HexEntryId (PR_EntryId Property) of the appointment so if you do want to bind to the Calendar Item (and you have the rights to do so) you would need to covert it to an EWSId first eg </soap:Header> <soap:Body> <m:ConvertId DestinationFormat="EwsId">...

Retrieve email from MS Exchange (O365) using EWS Managed API

.net,visual-studio-2010,exchange-server,ews,exchangewebservices

Yes, you can. If you want to try it yourself, download EWSEditor from CodePlex.com and try it out.

How to move ItemAttachments to a Folder using EWS managed API 2

c#,email-attachments,exchangewebservices,ews-managed-api

This was answered by Glen Scales on the Exchange TechNet Forum. "That won't work because Move, Copy are only valid operations for real store Items. An ItemAttachment is still an attachment so the only valid operations that you can perform are those assoicated with attachments. The only real workaround with...

O365 REST API clarification

json,office365,exchangewebservices

The default for the API is to return only 10 entries per request. You can increase this up to 50. For larger result sets you have to use paging. http://msdn.microsoft.com/office/office365/APi/complex-types-for-mail-contacts-calendar#UseODataqueryparametersPageresults So in the browser, you could do: https://outlook.office365.com/api/v1.0/me/contacts/$count That would tell you how many total you have. Then you can...

Create Exchange Message Items with EWS and mark them for deletion

exchange-server,ews,exchangewebservices

That property your setting won't do anything it looks like you have pulled the sample from https://msdn.microsoft.com/en-us/library/office/dd633654%28v=exchg.80%29.aspx which is just a sample of creating a custom property for your own use. There is no back-end process that would use this property you just created. There are two ways of doing...

Exchange Error on Calendar item update :- At least one recipient isn't valid

c#,outlook,ews,exchangewebservices,extended-properties

Try using the overload version of Update that supports passing the SendInvitationsOrCancellationsMode enum, and pass SendInvitationsOrCancellationsMode.SendToNone. This will ensure that the server doesn't try to send meeting updates to attendees.

Create modified occurence in series

c#,.net,ews,exchangewebservices

If you are looking to modify a specific occurrence in a recurring series, please take a look at this EWS Managed API documentation.

Create contact group in EWS in contact folder other than WellKnownFolderName.Contact

c#,ews,exchangewebservices

To create a Contact Group in another contacts Folder you need to get the FolderId of that Folder and then use that in the Save Overload eg if you have a Contacts Folder under contacts called OtherContacts you can use something like this to find and then create the ContactGroup...

Get Calendar Items in Exchange

c#,list,generics,sharepoint,exchangewebservices

I was able to run this code using: System.Net.ServicePointManager.ServerCertificateValidationCallback = Ise_ExchangeInterface.CertificateValidationCallBack; m_Service = new ExchangeService(ExchangeVersion.Exchange2007_SP1); m_Service.Credentials = new WebCredentials(m_UserName, m_Password); m_Service.AutodiscoverUrl(m_UserName, Ise_ExchangeInterface.RedirectionUrlValidationCallback); ...

Modify Users via Exchange Online REST Api

powershell,azure,exchangewebservices,azure-active-directory

Here's the way to attack this problem the easy method, using the PowerShell module. Since you already have access to a great and fully featured PowerShell tool, there's really no reason to do this by hand with a REST API, in my experience. Using the MSONline Module We can do...

Get all appointments of all users or get all appointments of one room

exchangewebservices

With EWS the findItems operation is done per Mailbox Folder so if you want query other calendars you need to do multiple operations. In your code if you wanted to query the Room Mailbox that had a Primary SMTP Address of [email protected] you need to use the FolderId overload eg...

Sending Exchange WS emails - Not enough free threads in the ThreadPool to complete the operation

c#,.net,multithreading,threadpool,exchangewebservices

You should check the ThreadPool.GetAvailableThreads() and see if there is still available threads. Then you have two options. 1) expand the max number of thread (but you should avoid it) 2) just wait until some of the thread are done int availableThreads = 0; int completionPortThreads = 0; System.Threading.ThreadPool.GetAvailableThreads(availableThreads, completionPortThreads);...

EWS reply mail with original body

c#,email,ews,exchangewebservices

You should be able to do this by setting the BodyPrefix property on the reply. See https://msdn.microsoft.com/EN-US/library/office/dn617213(v=exchg.150).aspx

EWS subscriptions “falling off”

c#,exchange-server,ews,exchangewebservices

Are you getting "heartbeat" notifications and keeping track of whether any are missed? EWS Push subscriptions can be "lost" by Exchange over time, and if your code is not watching for MBs that are not getting their Status Events, then you will miss change notifications. In the event you miss...

Change the format of the MeetingRequest when creating an Appointment using EWS Managed API

c#,exchange-server,ews,exchangewebservices,ews-managed-api

There is no way to suppress the when and where text in EWS. It's purpose is to support non-calendar-capable email clients where only the body text is visible. http://social.msdn.microsoft.com/Forums/windowsapps/en-US/14e034da-9833-465e-ac48-207e465466bf/time-added-to-appointment-body-in-recipient-calendar?forum=exchangesvrdevelopment

How to map Exchange Web Service External Mail Id to Exchange Internal Message Id

exchange-server,exchangewebservices,exchange-server-2010

I believe the EWS ConvertId operation or EWS Managed API ConvertId method is what you want to use to do the conversion. There's more information here: Converting identifiers.

How to edit contact notes

java,exchange-server,exchangewebservices,ewsjavaapi

I found the solution. I had to use getBody() and setBody() methods.

Can you assign a task to a contact using exchange 2010 EWS Managed API 2.0?

exchange-server,exchangewebservices,exchange-server-2010

No, EWS does not support assigning tasks. You can access a user's mailbox either as a delegate or via impersonation and create Tasks in their Task folder, but you can't create one in your mailbox and assign to someone else.

EWS Managed API: Identify deleted email when fetching from “AllItems” folder

c#,ews,exchangewebservices

As you state, I don't think there is a property like that for mail items. I would use the GetFolder operation with the well known folder name "deleteditems" to get the Id of that folder. Then, I would ignore all mail items that has this Id as ParentFolderId....

Reuse EWS connection and negotiate authentication for Exchange

c#,exchange-server,ews,exchangewebservices

So it turns out that after I modified the EWS API to allow me to enable UnsafeAuthenticatedConnectionSharing on the HttpRequests, that my connection and authentication were actually being re-used. Fiddler was the one dropping my connections after I disabled the option "Tools -> Fiddler Options -> Connections -> Reuse server...

C# EWS Delete Appointment doesn't work

c#,ews,exchangewebservices

To use DeleteMode.MoveToDeletedItems, you need write access to the DeletedItems folder in addition to your access to the Calendar folder. If you don't want to add folder perms to the Deleted Items folder, you can use either DeleteMode.HardDelete or DeleteMode.SoftDelete.

How get user contacts list from EWS

exchange-server,ews,exchangewebservices

Have a look at https://msdn.microsoft.com/EN-US/library/office/jj190895(v=exchg.150).aspx. Contacts are just items in the user's mailbox. You might also download EWSEditor to poke around and see what's available.

How to use EWS on hosted Exchange with Impersonation?

c#,impersonation,exchangewebservices

You need to use the credentials of your "god-mode" user, but set the ImpersonatedUserId to the AD user. Something like: ex.Credentials = new WebCredntials("[email protected]", "password"); ex.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.PrincipalName, "[email protected]"); When you connect to Office 365 via EWS, you always need to supply credentials. You can't use UseDefaultCredentials = true....

Get all contacts from exchange server

exchange-server,ews,exchangewebservices

You can sort of use EWS for retrieving your directory users using ExhangeService.ResolveName. The problem is that EWS will return no more than 100 users and there is no way to change it or to do any paging. So if you are in a larger company you can't really do...

Office 365 Rest API - Retrieving plain text Email

ews,office365,exchangewebservices

No, this isn't possible. I can provide this feedback to our developers. Can you give me some background on why you need this ability? Not that I'm questioning, it's just helpful to have some context. :)

Mapping Office365 REST Calendar IDs to EWS CalendarItem IDs

office365,ews,exchangewebservices,ews-managed-api

So it turns out that my IDs mismatched due to subscribing to EWS push notifications via the Exchange2007 version. Exchange2007_SP1 and beyond have compatible EwsIds with each other so this includes Office365. Replacing - characters with / and _ characters with + allows me to properly make calls to Office365...

Multiple calender in exchange web service

c#,asp.net,ews,exchangewebservices

To get all the Calendar folders that are located in your own Mailbox (not including those in your personal archive if you have one) you can do a FindFolders with a Deep Traversal and filter on folders with a Folder Class of IPF.Appointment eg something like ExtendedPropertyDefinition PR_Folder_Path = new...

Exchange web services (EWS): Send “meeting invitations” for meetings stored in a public folder calendar

php,ews,exchangewebservices,php-ews

on msdn they have a sample that create and sends the invite msdn link but this will not work for public folders: "The reason it shouldn't work is because public folders don't publish free/busy information. You cannot invite a public folder to a meeting nor can you see if a...

Exchange Web Services - how to load the Mime Content Type poeprty of an item attachment

c#,email,email-attachments,exchangewebservices,exchange-server-2010

in the end I did this (basically I needed to load the Mimi content of the ietem attachment, plus some extra properties: itemAttachment.Load(new PropertySet(BasePropertySet.FirstClassProperties)); itemAttachment.Load(new PropertySet( BasePropertySet.IdOnly, ItemSchema.Subject, ItemSchema.DateTimeReceived, ItemSchema.DisplayTo, EmailMessageSchema.From, EmailMessageSchema.Sender, EmailMessageSchema.HasAttachments, ItemSchema.MimeContent, EmailMessageSchema.Body, EmailMessageSchema.Sender, ItemSchema.Body) { RequestedBodyType =...

Create mail in Exchange Online inbox programatically

exchange-server,office365,exchangewebservices

You need to set a couple of properties before saving the message. // Set a delivery time ExtendedPropertyDefinition PidTagMessageDeliveryTime = new ExtendedPropertyDefinition(0x0E06, MapiPropertyType.SystemTime); DateTime deliveryTime = DateTime.Now; // Or whatever deliver time you want message.SetExtendedProperty(PidTagMessageDeliveryTime, deliveryTime); // Indicate that this email is not a draft. Otherwise, the email will appear...

How to create notes using EWS Managed API 2.0

c#,exchange-server,ews,exchangewebservices,ews-managed-api

A PostItem isn't the same as a note in the Notes folder. PostItem's represent items with a message class of IPM.Post. Notes, on the other hand, use the message class IPM.StickyNote. The managed API has no direct support for these items. You can retrieve them as EmailMessage objects, and you...

Download all email messages via EWS

c#,ews,exchangewebservices

You can build up a list of folders to search for mail in. Then iterate through each folder and get all the emails in that folder. In the code snippet below we can create a folderSearchFilter with FolderTraversal set to Deep which will scan all sub folders of the target...

Office 365 Exchange Mailbox Properties

c#,office365,exchangewebservices

You need to use Remote Powershell to do that see https://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.150).aspx. You can the use Get-Mailbox, Get-MailboxPermission and Get-MailboxFolderPermissions . EWS is only useful if you want to access the Mailbox content for Admin tasks you should use Remote Powershell. Cheers Glen...

Email Conversations / Email Threading support in EWS Managed Api (against Exchange 2010 or so)

asp.net,exchange-server,ews,exchangewebservices,ews-managed-api

Andrei- I've addressed some of the documentation questions you had in the comments, so I'm going to attempt to answer your real coding questions here. To get your master view, ExchangeService.FindConversation is the right method to use. It does support paging by limiting the results to the number of conversations...

C# Console Application connecting to Exchange Online

c#,exchange-server,office365,exchangewebservices

AutoDiscover works with Exchange Online. However, if are running your own DNS for the e-mail domain the administrator will have to configure the required DNS record. Exactly which DNS records are required for your domain is displayed in the Office365 portal.

EWS returns ServiceError.ErrorItemNotFound intermittently

c#,ews,exchangewebservices

I would take a look at the values in the failure case. What value is returned from ConvertId, and what is the existing value on the item (you can use EWSEditor to get this). Maybe by comparing the values you can get a better idea of what's happening.

EWS: unexpected SOAP validation error from Exchange 2013

web-services,soap,ews,exchangewebservices,exchange-server-2013

Try adding a RequestServerVersion element in your SOAP header and setting it to at least Exchange2010.

Return all email metadata in Office 365 Mail REST API preview

ms-office,odata,exchangewebservices,office365

Can you share the url you are using to access the Messages? If you are using something like: https://outlook.office365.com/ews/odata/Me/Inbox/Messages you should be seeing the Body property in the response. You can also specifically request selective properties using $select. For example: https://outlook.office365.com/ews/odata/Me/Inbox/Messages?$select=Subject,Body&$top=1 $top can be used to restrict the number of...

EWS attachment id vs attachment contentid

exchange-server,ews,exchangewebservices

The AttachmentId is what you use in EWS in the GetAttachment operation to get a specific attachment. The ContentId should be equivalent to the Mime Content-Id header see https://www.ietf.org/rfc/rfc2392.txt it is used for In-line attachments see http://msdn.microsoft.com/en-us/library/office/hh532564%28v=exchg.80%29.aspx Cheers Glen...

how to maintain folder hierarchy in exchnage web service when exporting mails

asp.net-mvc-4,c#-4.0,ews,exchangewebservices

You'll have to do a separate FindFolder operation to get the folder hierarchy: http://msdn.microsoft.com/en-us/library/office/dd633627(v=exchg.80).aspx Make sure to include view.Traversal = FolderTraversal.Deep; and do view.PropertySet = new PropertySet(BasePropertySet.IdOnly); view.PropertySet.Add(FolderSchema.DisplayName); view.PropertySet.Add(FolderSchema.ParentFolderId); to get the full hierarchy of relationships. You should then be able to match the ParentFolderId from the items to the...

How to decide Bounce Back EmailMessage on Office365?

c#,email,exchange-server,exchangewebservices

Check the ItemClass attribute. Messages like that should have a class that contains "REPORT" in it.

Getting Imap Details for microsoft exchange account using Autodiscover

python,ews,exchangewebservices

You can get IMAP information from the SOAP Autodiscover endpoint, but I don't believe the POX endpoint returns it. You would want to request the InternalImap4Connections and ExternalImap4Connections settings. See https://msdn.microsoft.com/EN-US/library/office/dd877068(v=exchg.150).aspx for documentation, and see https://code.msdn.microsoft.com/exchange/Exchange-2013-Get-user-7e22c86e for a .NET code sample you can use to experiment with....

Initial Exchange Web Services sync start on given time

c#,synchronization,ews,exchangewebservices

There is a way to avoid older events in calendar using service.SyncFolderItems() method. <SyncFolderItems> <ItemShape/> <SyncFolderId/> <SyncState/> <Ignore/> <MaxChangesReturned/> <SyncScope/> </SyncFolderItems> That Ignore parameter will accept List of event Ids. and ignore them while syncing. To do that , First we need to retrieve older event IDs, Exchange will only...

Fetching “cancelled” events through the Office 365 REST API

calendar,outlook,office365,exchangewebservices,outlook-restapi

Today, the calendar REST APIs match Outlook behavior. So https://outlook.office365.com/api/v1.0/Me/Events?$filter=isCancelled%20eq%20true only returns deleted events that appear on a user's Outlook as "Cancelled: " in the subject line. Once a user removes a cancelled meeting from their calendar, it won't be returned. For meeting series, we don't have a way to...

EWS can not receive push notification from office365

exchange-server,office365,ews,exchangewebservices

It's unlikely that PUSH notifications will work coming in from O365. Even if you do open your firewall port to the listening port you establish, there is still the matter of the routability of the URL you present to O365 for the notifications. E.g. if you give it "http://myserver:11111/pushhere" it...

EWS- Service XmlDeserializatin Exception was unhandles

c#,visual-studio-2010,visual-studio,ews,exchangewebservices

Are you trying to connect to an outlook.com mailbox? You can't use EWS to connect to outlook.com.

How to set Morris Chart y axis resolution

exchangewebservices,morris.js

Just try to change ymin values: ymin : 400 & ymax : 5001

EWS - Outlook Interop Synchronize

c#,outlook,office-interop,exchangewebservices,exchange-server-2010

You can either wait until the sync finishes - use Namespace.SyncObjects collection, retereive the first SyncObject object, call SyncObject.Start and wait for the SyncObject.SyncEnd event to fire. On the Extended MAPI level (C++ or Delphi) or Redemption (it wraps Extended MAPI and can be used in any language), open the...

Poor response times office 365 REST API

ms-office,ews,exchangewebservices,office365

Thanks for your mail and the detailed test results! This is a known issue impacting our REST API endpoint https://outlook.office365.com/api/v1.0 and a fix is on its way by end of year. A temporary workaround is to use our Preview endpoint https://outlook.office365.com/EWS/ODATA/ as this preview endpoint isn't impacted by the same...

How can I determine the revision of a calendar item in EWS when using a PullSubscription

exchange-server,exchangewebservices

The AppointmentSequenceNumber would only be valid for Meetings; on normal Appointments it isn't used. I had hoped to use the AppointmentSequenceNumber property when binding the Appointment item That wouldn't work even if it was incrementing. Exchange will always provide you with the current version and the only things valid in...

C# - Remove Exchange Email Address via Powershell Runspace

c#,powershell,ews,exchangewebservices,exchange-server-2010

Powershell uses the @{ key = value } syntax to create a hashtable. Instead of passing a string, pass the hashtable with a single remove element with the value of [email protected] See the related question Passing a hashtable from C# to powershell for more. command.AddCommand("Set-Mailbox"); command.AddParameter("Identity", "GenMgr"); var addresses =...

How to get the recipients of an email using EWS

c#,arrays,email,collections,exchangewebservices

You need to initialize the array correctly, and you need to use the Address property of a ToRecipient: var Recipients = new string[email.ToRecipients.Count]; for (int iIdx = 0; iIdx < email.ToRecipients.Count; iIdx++) { Recipients[iIdx] = email.ToRecipients[iIdx].Address; } BTW, I think you have a typo in your pseudo-code: for(...; iIdx<-email.ToRecipients.Count; ...)...

Appointment.Save and Appointment.Update always set IsMeeting to true

c#,visual-studio,ews,exchangewebservices

EWS uses the same object type for meetings and appointments. The default behavior when you Save() or Update() an appointment is to send meeting invitations even if you haven't invited anyone. This essentially sets the IsMeeting to true. To save this as an appointment, change your line of code for...

EWS Edit Attachments in a Forward Email

exchange-server,ews,exchangewebservices,ews-managed-api

After you call the Save method ForwardEmail = response.Save(WellKnownFolderName.Drafts); You should then do Load using a propertySet the specifies you want the attachments returned eg PropertySet psPropset = new PropertySet(BasePropertySet.FirstClassProperties); ForwardEmail.Load(psPropset); That should then populate the Attachment Collection. Cheers Glen...