Calendar start = Calendar.getInstance();
start.set(2016, Calendar.JUNE, 13, 21, 0, 0);
Calendar end = Calendar.getInstance();
end.set(2016, Calendar.JUNE, 14, 21, 0, 0);
PersonalStorage pst = PersonalStorage.create(System.getProperty("user.dir") + PST_CL, FileFormatVersion.Unicode);
FolderInfo fi = pst.createPredefinedFolder("Calendar", StandardIpmFolder.Appointments);
FolderInfo subFolder = fi.addSubFolder("Calendar RRULE", fi.getContainerClass());
DateFormat formatter = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
String pattern = String.format("DTSTART:%s\r\nDTEND:%s\r\n%s",
formatter.format(start.getTime()),
formatter.format(end.getTime()),
"RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=6;BYMONTHDAY=14;BYDAY=MO,TU,WE,TH,FR,SA,SU;WKST=SU"
);
MapiCalendar appointment = new MapiCalendar(
"LAKE ARGYLE WA 6743",
"Flaq Day",
"Description",
start.getTime(),
end.getTime()
);
var recurrence = new MapiCalendarEventRecurrence();
recurrence.setRecurrencePattern(MapiCalendarRecurrencePatternFactory.fromString(pattern));
appointment.setRecurrence(recurrence);
subFolder.addMapiMessageItem(appointment);
@Viktoriia,
Thank you for the issue description. I logged the issue with ID EMAILJAVA-34948 in our tracking system. Our development team will investigate this case. We will inform you of any progress.