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

Free Support Forum - aspose.com

Reg CancelAPpointment in Calendar

Hi,

We are using Apose.Network 6.6 and we are trying to cancel appointment. We have used the uniqueid of the requestappointment as reference for cancelapointment. But the appointment is not cancelled. We have also attached the code for your reference. This is tested based on Gmail.

Hi,

Thank you for inquiry.

I have checked the attached application, there is a slight problem in assigning the UniqueId of the appointment. UniqueId gets a value only after alternate view is added to the email. Please see below code for underlined changes.

agendaAppointment = new Aspose.Network.Mail.Appointment(“Rendez-vous”, “libelle”, “libelle”, startDate, endDate, txtUserName.Text, mailAddressColl);
//string uniqueId = agendaAppointment.UniqueId; // UniqueId will always be null
mailMsg = new MailMessage();
mailMsg.Subject = “Rendez-vous”;
mailMsg.Body = “Rendezvous”;
mailMsg.AlternateViews.Add(agendaAppointment.RequestApointment());
// Move here, a value will be present only after adding the alternate view
string uniqueId = agendaAppointment.UniqueId;