Update one instance of a recursive meeting

Hi,

Can you please tell me how can we update one occurence of a recurrence meeting (like change in location for one meeting alone) while sending the mail from Aspose.Email?

Regards,

Deivarayan

Hi Deivarayan,

Thanks for writing to Aspose.Email support team.

I have analyzed the requirement and tried the scenario. I sent a series of appointments as discussed in your post: Weekly Recursive Meeting related properties in Aspose.Email.

Later using the same appointment unique id , I tried to change the third meeting on May 15, 2013 by providing the new location. Following sample code is used for this purpose:

String szUniqueId;
MailMessage msg1 = new MailMessage();
msg1.To.Add(“user1@gmail.com”);
msg1.From = new MailAddress(“user2@gmail.com”);
Appointment agendaAppointment = default(Appointment);
System.DateTime StartDate = new DateTime(2013, 5, 13, 10, 0, 0);
System.DateTime EndDate = new DateTime(2013, 5, 13, 11, 0, 0);
agendaAppointment = new Appointment(“same place”, StartDate, EndDate, msg1.From, msg1.To);
szUniqueId = Guid.NewGuid().ToString();
agendaAppointment.UniqueId = szUniqueId;
agendaAppointment.Description = “----------------”;
Aspose.Email.Mail.Calendaring.WeeklyRecurrencePattern pattern2 = new Aspose.Email.Mail.Calendaring.WeeklyRecurrencePattern(10);
pattern2.StartDays = new Aspose.Email.Mail.Calendaring.CalendarDay[3];
pattern2.StartDays[0] = Aspose.Email.Mail.Calendaring.CalendarDay.Monday;
pattern2.StartDays[1] = Aspose.Email.Mail.Calendaring.CalendarDay.Tuesday;
pattern2.StartDays[2] = Aspose.Email.Mail.Calendaring.CalendarDay.Wednesday;
pattern2.Interval = 1;
agendaAppointment.RecurrencePattern = pattern2;
msg1.AlternateViews.Add(agendaAppointment.RequestApointment());
SmtpClient smtp = GetSmtpClient();
smtp.Send(msg1);
//////////////////////////////////////////////////////////////////////////////

StartDate = new DateTime(2013, 5, 15, 10, 0, 0);
EndDate = new DateTime(2013, 5, 15, 11, 0, 0);
Appointment appUpdate = new Appointment(“Different Place”, StartDate,
EndDate, “newcustomeronnet@gmail.com”, “email@domain.com”);
appUpdate.UniqueId = szUniqueId;
Aspose.Email.Mail.Calendaring.WeeklyRecurrencePattern pattern3 = (Aspose.Email.Mail.Calendaring.WeeklyRecurrencePattern)appUpdate.RecurrencePattern;
appUpdate.Summary = “update meeting request summary”;
appUpdate.Description = “update”;
MailMessage msgUpdate = new MailMessage(“newcustomeronnet@gmail.com”, “email@domain.com”, “06 - test email - update meeting request”, “test email”);
msgUpdate.AddAlternateView(appUpdate.UpdateAppointment());
smtp.Send(msgUpdate);

However it is found that all the 10 series of meetings are replaced with this single meeting. We have a limitation that if we just perform changes in the May 15, 2013 appointment and send update request, all the 10 appointments are deleted and this one time appointment is saved. Reason is clear that we have not sent any recurrence pattern in the updated appointment.

Second option is that we create an update appointment such that we create a recurrence pattern which contains all the attributes similar to the original series of appointments but just May 15, 2013 appointment contains different location. This is not possible as pattern creating language does not allow to create such pattern.

It seems that if you require to change a particular appointment in future, then you may send multiple appointments so that each contain different unique id and can be referred individually for modification or cancellation.

Please feel free to write us back if you have any other query in this regard.