aspose-email-for-java

Aspose.Email for Java 17.10 has been released. Ported from its equivalent .NET version, this month’s release includes enhancement of filtering appointments from Exchange Server using EWS client of the API. It also includes several bug fixes which further improve the overall API functionality. For a detailed note on what is new and fixed, please visit the release notes section of Aspose.Email for Java 17.10.

Filter Appointments from Exchange Server using EWS

This release of Aspose.Email for Java introduces the capability of filtering appointments from Exchange Sever using its IEWSClient. Appointments can be filtered from Exchange server using the IEWSClient of the API with the help of ExchangeQueryBuilder. Appointments can be filtered from server by:

  • Date
  • Recurrence

The following code snippets show filtering appointments from Exchange server using this new feature.

Filter Appointments by Date

IEWSClient client = EWSClient.getEWSClient(mailboxUri, username, password, domain);

SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
		
ExchangeQueryBuilder builder = new ExchangeQueryBuilder();
builder.getAppointment().getStart().since(sdf.parse("10/05/2016 10:00:00"));
builder.getAppointment().getEnd().beforeOrEqual(sdf.parse("10/15/2016 10:00:00"));
MailQuery query = builder.getQuery();
Appointment[] appointments = client.listAppointments(query); 

Filter Appointments by Recurrence

builder = new ExchangeQueryBuilder();
builder.getAppointment().isRecurring().equals(false);
MailQuery query = builder.getQuery();
Appointment[]appointments = client.listAppointments(query);

Other Improvements

This month’s release also includes several bug fixes that further add to the overall stability of the API. In addition, since the API is ported from its equivalent .NET version, it also includes all those fixes which were part of the .NET version. Detailed information about the fixes can be found in the release notes section of the API documentation.

API Resources

We have detailed information available online for getting started with the Aspose.Email for Java API. These are: