outlookicalendarmimemsgmsgkit

How can I create a Calendar .MSG file using MsgKit


I am trying to create a .msg file, preferably using MsgKit, that is a calendar invite. As I understand it, it needs to be a MIME message with only one (main) text/calendar part. How can I do that? Specifically:

  1. Is the MIME component the Appointment.Save() byte array?
  2. Do I then put that in an Email object? If so, where/how?

The security warning Outlook pops up for an .ics file is:

enter image description here


Solution

  • Firstly, MIME and MSG file formats have nothing in common - the former is a text file that you can open in Notepad, the latter is a binary OLE (IStorage) file.

    If you can help it, try to go with MIME - it is so much easier to deal with and you don't need any libraries to create. If you want to have an example of what Outlook itself produces, try to send a meeting invitation to a Gmail address and then look at the raw message source in your Gmail account.