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

Free Support Forum - aspose.com

MapiCalendar error while trying to insert it into PST file

Hello,
I’m getting the following error while trying to insert a MapiCalendar item into a PST file:

ERROR||Start date 13/8/2018 0:00:00 not valid for this rule - Recur every  month on the  Tuesday on the 2nd set position(s).

If you want to ignore an exception and want to proceed further then you can use: 
ExceptionManager.getIgnoreList().add("MapiMessage\\Load\\CalendarToMapiMessage\\ac60bda8-4a22-4f47-ad2b-c1ab7760809b")

My code is below:

InputStream stream = new ByteArrayInputStream(rawCalendarDecoded,0,rawCalendarDecoded.length);
Appointment appointment = Appointment.load(stream);
		        
MailMessage mailMessage = new MailMessage();
mailMessage.addAlternateView(appointment.requestApointment());
		        
MapiMessage mapiMessage = MapiMessage.fromMailMessage(mailMessage);

MapiCalendar mapiCalendar = (MapiCalendar)mapiMessage.toMapiMessageItem();
		        			        
calendarFolder.addMapiMessageItem(mapiCalendar);   // <-- line which gets the error

Please let me know how I can solve this issue.

Thanks

@kelberuc1

Can you please share the source file that you are trying to add so that I may try to reproduce the issue on my end.