How to set recurrence pattern calendar (.pst file)

Hello Kashif Iqbal sir ,


If aspose team solve issues of setting daily,weakly,monthly,yearly recurrence pattern in calendar in .pst file.then we will purchase full license for aspose.email for java(jar file). I have evaluated this jar file but it contaice above issues.

you provided last post solution is *****

Hi Ajinath,

Thank you for writing to Aspose support team.

We have tested the code and observed that Aspose.Email for Java is having issue while adding calendar recurrences to PST. This issue is logged under Id: EMAILJAVA-33574 for further investigation by the product team. You will be automatically notified once any update is received in this regard. Following code is used to re-produce the issue here.

static private void Email_704211_Monthly()
{
MapiCalendar mapiMonthly = null;
java.util.Calendar calendar = java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone(“GMT”));

calendar.set(2015, java.util.Calendar.JANUARY, 1, 0, 0, 0);

Date startDate = calendar.getTime();

calendar.set(2018, java.util.Calendar.MARCH, 1, 0, 0, 0);

Date endDate = calendar.getTime();


MapiCalendarMonthlyRecurrencePattern rec = new MapiCalendarMonthlyRecurrencePattern();
rec.setPatternType(MapiCalendarRecurrencePatternType.Month);
rec.setPeriod(60);
rec.setWeekStartDay(0);
rec.setEndType(MapiCalendarRecurrenceEndType.NeverEnd);

MapiCalendarEventRecurrence f_reccurence = new MapiCalendarEventRecurrence();
f_reccurence.setRecurrencePattern(rec);

mapiMonthly = new MapiCalendar(“This is Location”, “This is Weekly”, “This is description”,startDate, endDate);

mapiMonthly.setLocation(“This is location”);

mapiMonthly.setRecurrence(f_reccurence);

PersonalStorage pst = PersonalStorage.create(“output2.pst”, FileFormatVersion.Unicode);
FolderInfo calendarFolder = pst.createPredefinedFolder(“Calendar”, StandardIpmFolder.Appointments);
calendarFolder.addMapiMessageItem(mapiMonthly);

}
static private void Email_704211_Weekly()
{
MapiCalendar mapiWeekly = null;
java.util.Calendar calendar = java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone(“GMT”));

calendar.set(2015, java.util.Calendar.JANUARY, 1,0,0,0);

Date startDate = calendar.getTime();

calendar.set(2016, java.util.Calendar.MARCH, 1,0,0,0);

Date endDate = calendar.getTime();


MapiCalendarEventRecurrence f_reccurence = new MapiCalendarEventRecurrence();

f_reccurence.setRecurrencePattern(new MapiCalendarWeeklyRecurrencePattern());

f_reccurence.getRecurrencePattern().setPatternType(MapiCalendarRecurrencePatternType.Week);

f_reccurence.getRecurrencePattern().setOccurrenceCount(2);



f_reccurence.getRecurrencePattern().setPeriod(2);

f_reccurence.getRecurrencePattern().setEndType(MapiCalendarRecurrenceEndType.NeverEnd);



mapiWeekly = new MapiCalendar(“This is Location”, “This is Weekly”, “This is description”,startDate, endDate);

mapiWeekly.setLocation(“This is location”);

mapiWeekly.setRecurrence(f_reccurence);

PersonalStorage pst = PersonalStorage.create(“output.pst”, FileFormatVersion.Unicode);
FolderInfo calendarFolder = pst.createPredefinedFolder(“Calendar”, StandardIpmFolder.Appointments);
calendarFolder.addMapiMessageItem(mapiWeekly);
}
Thanks & Best Regards,

Kashif Iqbal
Happiness Developer
Customer Happiness Team

*******************************************


Hi Ajinath,

Thank you for contacting Aspose Support team.

There is no need to create a new Post for an existing inquiry that you have made earlier. Please follow this thread for inquiring about the status of the logged issue i.e. EMAILJAVA-33574. Once the issue is resolved or there is some information available that we need to send to you, we’ll contact you via the same thread where the issue is logged. If you have any other inquiry, please use the “Reply” option instead of creating a new thread. You can, however, create a new thread/post if you face some other issue that is different than the reported one.