-1

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

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

10 Comments

I did as you suggested and looked at the raw email sent. It has a text/plain, text/html, and text/calendar block. And the text/calendar is a base64 encoded .ics file. The .ics file has several X-MICROSOFT- lines. Before I go to all the work writing code to create this, will this then give me a file that Outlook will view as an invite with no Security warning? TIA.
What security warming do you mean? A warning like "A program is trying to ..."? Or a warning prompting you to open an attachment?
I am still not sure why you want an attachment - if the MIME message is properly formatted, Outlook will see it as a meeting invitation instead of a regular message with an ICS attachment.
My use case is as follows. The user signs up for an event. They get a link for the event (full page display). On that page I want to have 3 links: Download .ics, Google Calendar event link, Event to add to Outlook. I've seen web pages that have this where it's a .msg file (for a .ics file Outlook puts up a scary security warning). I don't care if this is a file like .ics or a link like Google, but I want something where they click on it, if a file open it, and it's an event for Outlook. With no security warning. Does that make sense? TIA
Which security warning do you mean?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.