+2 votes

Until now we had been using Method.Request for sending meeting requests. We build the Appointment using a generic function. For our cancel email, we use the same function and then use 'Appointment.Cancel'. This works fine and lets the receiving user remove the meeting from his / her calendar.

However, when using Method.Publish, the Cancel method appears to do nothing. We have to manually update the Appointment.Method and Event.Status properties to Canceled. Plus, I'm not sure if the Cancel() method does more than just that?

Either way, is there a reason for it not working or is it a bug? Should I do things differently when using Method.Publish?

by (450 points)

1 Answer

0 votes

Appointment.Cancel creates a cancelled appointment (with all events canceled, and method set to Method.Cancel):

Appointment appointment = ...;
Appointment canceled = appointment.Cancel()

When you are using MailBuilder.AddAppointment or FluentMail.AddAppointment method new MIME entity is created and added to your email.

Its ContentTypeMethod ('method' parameter of 'content-type' header) is set accordingly to the value of Appointment.Method property.

In case of new appointment it is Method.Publish, in case of canceled appointment it is Method.Cancel.

You shouldn't use Method.Publish for canceled appointments.

by (272k points)
...