I am writing a program to generate emails containing multiple announcements, some of which are "events." These events need to be addable to each recipient's Outlook Calendar. With as much as 20 events per email, attachments of .ics files are not an option, as each attachment could only be known by associating the event name with the file name and an ugly clutter of attachments would overwhelm each user's inbox.
I've reverted to using hyperlinks to server-hosted .ics files in the body of the email, that way the user can know which .ics file belongs to which event in the respective HTML table. Problem is, when the user clicks a link, the file downloads to local disk by default, so the user has to reopen it to add the event to his or her calendar. This behavior was not analyzed with the attachments; they would automatically open in Outlook's meeting/calendar preview window, like below:
Is there a way to match the behavior of the hyperlink to that of the attachment? I'm wondering if it can be done by changing the properties of the .ics file. Here is how mine are generally structured:
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
DESCRIPTION:Announcement Description
DTSTAMP:20220516T040000Z
DTEND:20220516T050000Z
DTSTART:20220516T040000Z
LOCATION:https://www.example.com
ORGANIZER:MAILTO:xxxxxxxxxxxx@gmail.com
ATTENDEE:xxxxxxxxxxxxx@gmail.com
SEQUENCE:0
SUMMARY:Event Summary
UID:{Sample UUID}
END:VEVENT
I'm also open to how I can best manage grouping the event names with their respective .ics files in the email body.