The main product overview for Aspose.Network states that it can cancel an iCalendar event. Since the wiki is mostly broken (access denied), I could not determine how this is done.
Could you please provide a code example of how to do this?
Thanks!
Dan Thayer P.S. If it matters, I am using Outlook and Exchange Server.
Well our ETA was about 4 months ago when we thought this feature was already implemented. I would say that ASAP is our new ETA. The moment you have this feature completed we will be able to immediately make use of it.
Will this feature be included anytime soon? It would be great if we can mark the Meeting with a unique number so that when we send an update or cancel, we can pass in same number and Outlook will know what to do.
Will this feature be included anytime soon? It would be great if we can mark the Meeting with a unique number so that when we send an update or cancel, we can pass in same number and Outlook will know what to do.
In order to send cancel event request, you have to first save the message to file, then load the calendar and create the cancel request. Please try the sample and hotfix, let me know if it works.
Here is the sample code:
1. First send the meeting request and save the message to file
//send meeting request MailMessage msg = new MailMessage(); msg.From = "organizer@domain.com"; //attendees for the event MailAddressCollection attendees = new MailAddressCollection(); attendees.Add(new MailAddress("attendee1@domain.com")); attendees.Add(new MailAddress("attendee2@domain.com")); msg.To = attendees; //create calendar Calendar cal = new Calendar("Room 113", new DateTime(2008, 8, 25, 15, 0, 0), new DateTime(2008, 8, 25, 16, 0, 0), msg.From, attendees); cal.Summary = "Release Meetting 113"; cal.Description = "Discuss for the next release"; //add calendar to the message msg.AddCalendar(cal); msg.Save("message.eml"); //send the email message SmtpClient smtp = new SmtpClient("smtp.server.com","user","password"); smtp.Send(msg);
2. Load the message files and get the calendar information. //load the mail message MailMessage msg = MailMessage.Load("message.eml"); //get the meeting calendar from the message msg.AlternateViews[0].Save(@"meeting.ics");
3. Create cancel calendar object from the ics files, add it to MailMessage Object's AlternativeViews
//create cancel request based on the meeting request AlternateView v = Calendar.CreateCancelRequestFrom(@"meeting.ics"); msg = new MailMessage(); msg.AlternateViews.Add(v); msg.Subject = "Cancel: Release Meetting 113"; msg.From = "organizer@domain.com"; //attendees for the event MailAddressCollection attendees = new MailAddressCollection(); attendees.Add(new MailAddress("attendee1@domain.com")); attendees.Add(new MailAddress("attendee2@domain.com")); msg.To = attendees; SmtpClient smtp = new SmtpClient("smtp.server.com","user","password"); smtp.Send(msg);
1. Instead of saving the entire message as a file and then loading it later on, is there a way to exract a unique ID from the message, save it to the DB and then populate it later on to send a Cancel?
2. Is there a way to receive the meeting's response and know where it is coming from based on the ID (accept, reject...)?
1. At least we need to save the calendar information if you don't want to save the whole message to disk. Let's say, after you send the meeting request, save the calendar information to db or disk. Then load them and generate the cancel request. Because we need the information like attendee, timezone, unique id, sequence .. from the calendar itself.
2. I will do some investigation and get back to you shortly.
I'm glad to see that some version of cancelling is finally available! It has been a long wait and this will be most helpful.
I agree with 'avi' though...there must be an easier way. You mentioned that you need to know the information about the original calendar event such as attendee, timezone, unique id, sequence, etc. In my situation I can recreate that information since most of it is stored in a db already for other purposes. Would it be possible to extract the unique id and save just that piece of information to cancel the request?
I also save the general meeting info in a database (subject, time, etc...)
Therefore,
1. Instead of saving the entire message as a file and then loading it later on, is there a way to exract a unique ID from the message, save it to the DB and then populate it later on to send a Cancel?
2. Is there a way to receive the meeting's response and know where it is coming from based on the ID (accept, reject...)?
Could you provide an update on where you are in regards to extracting just the unique id to cancel an iCalendar event? See the previous two posts for details.
Once the above is working, could you implement the ability to update an existing iCalendar event rather than just cancelling? I imagine the process is similar.
We have merged Aspose.iCalendar into Aspose.Network in the lastest release. The development team will focus on providing better solution on iCalendar event construnction and parsing.
Your suggestions and requirements will be published shortly. They are still under test.