0

I can programmatically create an email with an .ics file attached. The email gets sent, the recipient clicks the .ics attachment to add it to their calendar. This is easily done.

I want to try and make Outlook behave a little different. When the user previews the message it detects that its calendar type and throws a prompt asking the user to take some action. This action decides if it gets pushed into the calendar. In a perfect world to have accept/reject/ignore options would be super sweet. Is it possible to construct/send and email in such a way that Outlook can treat it different from a standard email? E.G perhaps altering the type (CONTENT-TYPE:text/calendar)?

Note - I have seen a solution where the body contains a link to the .ics file informing the user about the calendar invite details. It then has a click here to Accept. This is nice because the .ics file does not have to be attached.

I am workign in VBScript/VBS world although Im not sure this is all that important. Has anybody done this is any sense. Is it even possible?

edited: I ended up using the EASendMail component located here it has an autoCalendar property which works really well. It embeds the .ics file as a text/calendar and send the message as a text/calendar. The outcome is perfect, just like it was actually sent from the outlook. It previews with with the action buttons and even loads the meeting in Outlook at tentative waiting for action

Mat41
  • 1,287
  • 4
  • 15
  • 29
  • 1
    Are you talking about programmatically creating something like a meeting request? – tonyyeb Jan 12 '17 at 09:43
  • 1
    If a link is a suitable solution then surely all you need to do is to send your cdo email in html format and include a hyperlink to your .ics file – John Jan 12 '17 at 16:01
  • As suggested [here](https://support.office.com/en-gb/article/Create-an-Add-to-calendar-link-in-an-email-message-34f8ea28-322a-4867-b423-2998f9634e59?ui=en-US&rs=en-GB&ad=GB&fromAR=1) like @John – Kul-Tigin Jan 12 '17 at 17:54
  • Thank you for your replies. Apologies if I was not clear in my post but I did mention that I has seen the approach which uses a link in the email body to the .ics file. I was hoping to make outlook behave a little different. Wondering if it was possible for outlook to recognize a calendar content type on preview somehow? IMO this would be a more impressive user experience.... – Mat41 Jan 12 '17 at 22:46

1 Answers1

0

Your email needs to follow a proper MIME structure for it to be recognized as an invitation. See Multipart email with text and calendar: Outlook doesn't recognize ics

Community
  • 1
  • 1
Arnaud Quillaud
  • 4,420
  • 1
  • 12
  • 8
  • Thank you for your input. Even when using the correct type I dont think you can alter the preview behavior like I am trying to. I can not find a way to promote the accept, reject, save etc.... options on preview. It seems like a requirement to click something. Either a link in the email to the ics file (attaching is optional in this case) or the attached ics file – Mat41 Jan 16 '17 at 23:19
  • What exact MIME message are you sending ? – Arnaud Quillaud Jan 17 '17 at 08:06
  • I am using text/calendar. I have edited the OP with the solution – Mat41 Jan 18 '17 at 04:50