i am trying to Import ics file to PST using below code its giving me stack overflow may be its because this ics file have to two attachments .When i am importing normal ics file without any attachment then Appointment.load(.ics) working fine.
Appointment appointment = Appointment.load(file.getAbsolutePath());
MailMessage mailMsg = new MailMessage();
mailMsg.addAlternateView(appointment.requestApointment());
MapiMessage mess = MapiMessage.fromMailMessage(mailMsg);
if(mf.checkcalendar)
{
mf.pst.createPredefinedFolder("Calendar", StandardIpmFolder.Appointments);
mf.checkcalendar=false;
}
mf.info1=mf.pst.getPredefinedFolder(StandardIpmFolder.Appointments);
mf.info1.addMapiMessageItem(mess);