Hi team, I am using Aspose.Email version 26.1.0.3 to load and save ICS calendar files.
Sample code:
try (InputStream stream = new FileInputStream(new File("C:\\tmp\\calendar.ics"))) {
AppointmentLoadOptions alo = new AppointmentLoadOptions();
alo.setIgnoreSmtpAddressCheck(true);
for (CalendarReader reader = new CalendarReader(stream, alo); reader.nextEvent(); ) {
Appointment appointment = reader.getCurrent();
appointment.save("C:\\tmp\\ics\\"+appointment.getUniqueId(), new AppointmentIcsSaveOptions());
}
}
When saving the appointment, the output ICS files do not preserve all X-MICROSOFT-* properties from the original event.
For example, the original event contains:
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MICROSOFT-REQUESTEDATTENDANCEMODE:DEFAULT
X-MICROSOFT-ISRESPONSEREQUESTED:FALSE
But the saved ICS only contains a subset, and some properties are missing or empty:
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-INTENDEDSTATUS:
X-MICROSOFT-CDO-IMPORTANCE:1
Expected:
All X-MICROSOFT-* properties should be preserved when loading and saving ICS files.
The sample calendar.ics file:
calendar.zip (1.5 KB)
Please advise if this is a limitation or a bug, and if there is a workaround to preserve all custom properties.