Hi Aspose
If importing an ICS file as an appointment, using the code and ics file below, the appointment is shown as 'Not Accepted' in Outlook. The Organizer address displays correctly, but the Appointment status shows 'Please Respond', and if choosing the 'Accept' button, the acceptance notification is not addressed to the specified Organizer.
If manually importing the same *.ics file using Outlook, everything works as expected.
What do we need to do to mark imported appointments as 'Accepted' in Outlook? This is using Aspose.Email for Java 17.2.
Thanks
Code
String pathPSTFileStr = "c:\\temp\\testPST.pst";
String testFile = "c:\\temp\\test.ics";
PersonalStorage pst = PersonalStorage.create(pathPSTFileStr, 0);
Appointment calDoc = Appointment.load(testFile);
MailMessage calMsg = new MailMessage();
calMsg.addAlternateView(calDoc.requestApointment());
MapiMessage calMapiMsg = MapiMessage.fromMailMessage(calMsg);
FolderInfo calFolder = pst.createPredefinedFolder("Calendar", StandardIpmFolder.Appointments);
MapiCalendar mapiCal = (MapiCalendar)calMapiMsg.toMapiMessageItem();
calFolder.addMapiMessageItem(mapiCal);
*.ical file
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
PRODID:-//Test Company//NONSGML My Product//EN
BEGIN:VEVENT
CLASS:PUBLIC
TRANSP:OPAQUE
DTSTART:20170322T220000Z
DTEND:20170322T230000Z
DTSTAMP:20170322T004138Z
CREATED:20170314T005215Z
LAST-MODIFIED:20170322T013130Z
UID:87ADB15FB0731E4DCC257D1E0003D023
SEQUENCE:0
ORGANIZER;CN="John Lowndes":mailto:John_Lowndes@xxyyzz.com
ATTENDEE;CN="Joe User";RSVP=FALSE:mailto:joe.user@xxyyzz.com
SUMMARY:Test Meeting
DESCRIPTION:This is the description
END:VEVENT
END:VCALENDAR
If importing an ICS file as an appointment, using the code and ics file below, the appointment is shown as 'Not Accepted' in Outlook. The Organizer address displays correctly, but the Appointment status shows 'Please Respond', and if choosing the 'Accept' button, the acceptance notification is not addressed to the specified Organizer.
If manually importing the same *.ics file using Outlook, everything works as expected.
What do we need to do to mark imported appointments as 'Accepted' in Outlook? This is using Aspose.Email for Java 17.2.
Thanks
Code
String pathPSTFileStr = "c:\\temp\\testPST.pst";
String testFile = "c:\\temp\\test.ics";
PersonalStorage pst = PersonalStorage.create(pathPSTFileStr, 0);
Appointment calDoc = Appointment.load(testFile);
MailMessage calMsg = new MailMessage();
calMsg.addAlternateView(calDoc.requestApointment());
MapiMessage calMapiMsg = MapiMessage.fromMailMessage(calMsg);
FolderInfo calFolder = pst.createPredefinedFolder("Calendar", StandardIpmFolder.Appointments);
MapiCalendar mapiCal = (MapiCalendar)calMapiMsg.toMapiMessageItem();
calFolder.addMapiMessageItem(mapiCal);
*.ical file
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
PRODID:-//Test Company//NONSGML My Product//EN
BEGIN:VEVENT
CLASS:PUBLIC
TRANSP:OPAQUE
DTSTART:20170322T220000Z
DTEND:20170322T230000Z
DTSTAMP:20170322T004138Z
CREATED:20170314T005215Z
LAST-MODIFIED:20170322T013130Z
UID:87ADB15FB0731E4DCC257D1E0003D023
SEQUENCE:0
ORGANIZER;CN="John Lowndes":mailto:John_Lowndes@xxyyzz.com
ATTENDEE;CN="Joe User";RSVP=FALSE:mailto:joe.user@xxyyzz.com
SUMMARY:Test Meeting
DESCRIPTION:This is the description
END:VEVENT
END:VCALENDAR