Free Support Forum -

Can we set PARTSTAT property to ics


Is it possible to set PARTSTAT property to an ICS file?


Aspose.Email for .NET API lets you set status of appointment attendees while formulating a reply message. This adds the PARTSTAT property to the ICS file. Please give a try to the following sample code and share the feedback.

string location = "Room 5";
DateTime startDate = new DateTime(2011, 12, 10, 10, 12, 11),
         endDate = new DateTime(2012, 11, 13, 13, 11, 12);
MailAddress organizer = new MailAddress("", "Organizer");
MailAddressCollection attendees = new MailAddressCollection();
MailAddress attendee1 = new MailAddress("", "First attendee");
MailAddress attendee2 = new MailAddress("", "Second attendee");

attendee1.ParticipationStatus = ParticipationStatus.Accepted;
attendee2.ParticipationStatus = ParticipationStatus.Declined;

Appointment target = new Appointment(location, startDate, endDate, organizer, attendees);