Working with Calendar Items on Exchange Server

Sending Meeting Requests

This article shows how to send a meeting request to multiple recipients using Exchange Web Services and Aspose.Email.

  1. Create a meeting request using the Appointment class and set the location, time and attendees.
  2. Create an instance of the MailMessage class and set the appointment using the MailMessage->AddAlternateView() method.
  3. Connect to the Exchange Server and send the meeting request using the IEWSClient->Send(MailMessage) method.

The EWSClient class can be used to connect to an Exchange Servers with Exchange Web Services (EWS) support. For this to work, the server has to be Exchange Server 2007 or later. The following code snippet shows you how to use EWS to send the meeting requests.

Working with Calendar Items using EWS

Aspose.Email provides the capability to add, update and cancel appointments using Exchange Web Service (EWS) client. The IEWSClient->CreateAppointment, IEWSClient->UpdateAppointment, and IEWSClient->CancelAppointment methods allow manipulating calendar items using EWS. This article provides a detailed code sample of working with Calendar items. The following code sample shows how to:

  1. Create an appointment.
  2. Update an appointment.
  3. Delete/Cancel an appointment.

Listing Appointments with Paging Support

The ListAppointments method exposed by the IEWSClient API retrieves the complete list of appointments from the Exchange server. This may take time if there are a large number of appointments on the Exchange Server. The API provides overloaded methods of ListAppointmentsByPage method that gives paging support to the operation. This can be used in different combinations with the querying feature as well. The following overloaded methods are available to list appointments from Exchange Server with Paging support.

The following code snippet shows you how to list appointments with paging support.

Adding Event to Secondary Calendar folder on Exchange Server

Aspose.Email API lets you create a secondary Calendar folder on Exchange Server using the IEWSClient. Appointments can then be added, updated or canceled from the secondary calendar using the IEWSClient->CreateAppointmentIEWSClient->UpdateAppointment, and IEWSClient->CancelAppointment methods. 

The following code snippet shows you how to add an event to a secondary calendar folder on the exchange server.

Sharing Calendar Invitation

Microsoft Exchange server provides the capability to share calendars by sending calendar invitations to other users, registered on the same Exchange server. Aspose.Email API provides the same capability by allowing to share the calendar using the EWS API.

Retrieving Extended Attributes Information from Calendar Items