Cancel Appointment Outlook

Hi

I am trying to send a new appointment and then in a second step I want to send the cancellation of the appointment. Sending a new appointment works fine (also sending an update of the appointment works). But the cancellation is somehow recognized wrong by outlook. It seems as it is sent as a msg instead of an ics. The cancellation is received as an attachment of the msg.

Aspose1.png (30.3 KB)

The attachment is called “not supported calendar message.ics”. When I open the attachment I can then cancel the meeting which works fine. But it should not be in an attachment, instead it should show up directly as it is in the next screenshot:

Aspose2.png (19.8 KB)

I tried to google about it and the only things I could come up with, where they have the same problem, are the following links. But I cannot translate the solutions to aspose. It also seems that an outlook update has something to do with it.

Here is my code of creating the appointment:

SmtpClient client = new SmtpClient(*******);
            MailAddressCollection attendees = new MailAddressCollection();
            attendees.Add(new MailAddress("*********@gmail.com", "*********"));
            
            MailMessage msg = new MailMessage();
            MailAddress fromAddress = new MailAddress("*********@gmail.com", "*******");
            msg.From = fromAddress;
            msg.To = attendees;

            DateTime dtFrom = new DateTime(2020, 11, 20, 15, 15, 0);
            DateTime dtUntil = new DateTime(2020, 11, 20, 16, 15, 0);

            Appointment app = new Appointment("In the office", dtFrom, dtUntil, fromAddress, attendees);
            app.Summary = "Super important Meeting";
            app.Description = "This is coming from me.";
            msg.AddAlternateView(app.RequestApointment());

            msg.Save(msg.MessageId + ".eml", SaveOptions.DefaultEml);
            client.Send(msg);

This is my code of cancellling the appointment:

    SmtpClient client = new SmtpClient(*******);
    MailAddressCollection attendees = new MailAddressCollection();
    attendees.Add(new MailAddress("*********@gmail.com", "********"));

    MailAddress fromAddress = new MailAddress("*********@gmail.com", "********");
    DateTime dtFrom = new DateTime(2020, 11, 20, 15, 15, 0);
    DateTime dtUntil = new DateTime(2020, 11, 20, 16, 15, 0);

    Appointment app = new Appointment("In the office", dtFrom, dtUntil, fromAddress, attendees);
    app.Summary = "Super important Meeting";
    app.Description = "This is coming from me.";
    app.UniqueId = savedUniqueId; //savedUniqueID from the previousely created appointment*;
    app.Status = AppointmentStatus.Cancelled;   //added this part while trying to solve the problem
    app.MethodType = AppointmentMethodType.Cancel;   //added this part while trying to solve the problem

    MailMessage msgCancel = new MailMessage("***********@gmail.com", "*********@gmail.com");
    msgCancel.Subject = "Cancel appointment";
    msgCancel.Body = "cancel appointment";
    msgCancel.AddAlternateView(app.CancelAppointment(2));

    msgCancel.Save(msgCancel.MessageId + ".eml", SaveOptions.DefaultEml);
    client.Send(msgCancel);

I am using the following product versions:
Outlook version: Microsoft Outlook for office 365 MSO (16.0.12527.21230) 32 Bit (just updated to 16.0.12527.21294 and still the same problem)
Aspose.Mail version: 20.10.0

@tanja14

I have opened a ticket with ID EMAILNET-39980 in our issue tracking system to further investigate this on our end and we will share the good news with you as soon as the investigation will get completed on our end

1 Like

Hello @mudassir.fayyaz
As I noticed the issue status of this ticket is “resolved”. What does that mean? What are the further steps on this ticket? Do I have to search for the EMAILNET-39980 somewhere else? Or do I wait on this ticket for a solution? Thank you in advance for a brief clarification.
Best regards

@tanja14

The concerned issue has been marked as resolved for upcoming Aspose.Email for .NET 20.12. We request for your patience and will share the good news with you as soon as the product will be shared online.

The issues you have found earlier (filed as EMAILNET-39980) have been fixed in this update.

1 Like