We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Need assistance for retrieving recurrence meetings within a specific date range using java

Hello Sir/Madam,

We need to retrieve all recurrence meetings that have been created from outlook for a specific date range using Aspose client in java platform.

We used options that are provided in below link http://www.aspose.com/docs/display/emailjava/Filter+Messages+from+Exchange+Mailbox

We used Mail query builder class and used internal date attribute of the class with since and before or equals option to pass date range (from and to dates) in order to get all recurrence meetings that lie within date range (from and to date).But we are still not able to get all recurrence meetings for the date range.
  • Can you please assist us in resolving above issue?
  • Can you please let us know specific time zone (EST/EDT/UTC) in which start and end date of meetings that have been created from outlook, would be returned from Aspose client in java platform?
  • Can you please let us know significance/mapping of unique key in Aspose with respect to exchange server(outlook) and let us know if it corresponds to Ical Id or change key that is available in exchange server (outlook)

  • Please note that version of aspose email jar that is being used is :
thanks and regards,

Hi Nalini,

Could you please share your sample code with us that you are trying at your end? The link you have shared is used to search for messages and direct way of filtering appointments is not available.

For your other queries, we are confirming the information and will share with you at once.

PS: Please use the latest version of the API i.e. 16.12.0 as the issues you are getting might be the result of old version you are using.

Hi Kashif,

Thank you for your response. Due to firm policy I am unable to share the code.

This is what we are trying to accomplish.

We need to connect to exchange server and retrieve appointments between two date ranges of up to 3 months. For each recurrence appointment, we need to

  1. get the start and end times in UTC
  2. determine the recurrence pattern.

We are interested only in recurrence appointments. As you have mentioned that this is not possiblem, we plan to get all appointments and drop what is not needed.

This is the pseudo code.
Create a client using EWSClient.getEWSClient
Create a MailQuery from MailQueryBuilder which uses since and beforeOrEqual
Get all the appointments calling client.listAppointments
For each appointment call getRecurrencePattern to determine if appointment is a recurrence appointment

Is this the recommended approach for doing this kind of work?
Also we are unable to retrieve any appointments in the next year. A MailQuery of ((‘InternalDate’ >= ‘4-Jan-2017’)&(‘InternalDate’ <= ‘24-Jan-2017’)) returns no data.

Thanks in advance for your help

Hi Nalini,

At present there is no such way to:

1. List Appointments that have occurrences between two dates
2. List Appointments that are based on MailQuery as InternalDate and SentDate parameters are for MailMessage and not for appointments

To investigate whether such a feature can be provided, we have forwarded a request to our Product team via issue id: EMAILNET-38574 and will let you know once there is some update or a fix version avilabe containing the implementation of this feature.

Also, there is no link/mapping between unique key of Aspose and that of Outlook (Exchange). For the time being, you will have to retrieve all the appointments and then remove those that are not required as there is no other way to do this.

Hi Kashif,

Thank you for your response.

I am confused at this point.

From the documentation I see two APIs

  1. Appointment[] IEWSClient.ListAppointments(String, MailQuery)
  2. ExchangeMessageInfoCollection IEWSClient.ListMessages(String, MailQuery)

Why would the library provide two API’s and both return only mail messages?

Are you saying that the Aspose library does not provide a way for me to retrieve appointments from the exchange server?

Thanks and Regards

Hi Nalini,

1. The ListAppointments returns a list of appointments directly from the Calendar folder. It returns all the appointments from the server which works fine. However, what we mentioned above is related to the overloaded method where MailQuery is used which doesn’t work in this case for specified dates. For example, if we have an appointment on server that is on 5 Jan 2016, then:

1.a. ListAppointments(String) lists all the appointments from the server
1.b. ListAppointments(String, MailQuery) returns 0 records

2. The ListMessages method is generalized method that also works for Calendar folder. However, for the above scenario:

2.a. ListMessages(String) lists all the items from Calendar folder
2.b. ListMessages(String, MailQuery) returns 0 records

The investigation ticket logged is for insight into the functionality mentioned in 1.b and 2.b. Hope this clarifies our explanation mentioned above. Please feel free to ask if you have further queries in this regard.

Hello kashif,

Meanwhile, is there a way to only retrieve certain occurences of an appointment between 2 dates? My calendar has a huge amount of appointments. This takes much time. I’d rather only list the appointments, which I’m going to use (i.e. appointments for the current month).

Thanks in advance.


We are sorry but this feature is also not available currently and will be done with the same ticket linked with this thread. We’ll update you here once there is some information available in this regard.