是否可以通过编程性强制强制开放.ICS文件超链接渲染作为日历项目而不是可下载的文件?
我正在编写一个程序,以生成包含多个公告的电子邮件,其中一些是“事件”。这些事件需要在每个收件人的Outlook日历中添加。每个电子邮件的附件多达20个事件,因此不是一个选项,因为只能通过将事件名称与文件名相关联,并且附件的丑陋混乱会淹没每个用户的收件箱。
我恢复了在电子邮件正文中使用超链接到服务器托管的.ICS文件,这样用户可以知道哪个。ICS文件属于相应的HTML表中的哪个事件。问题是,当用户单击链接时,文件将默认情况下下载到本地磁盘,因此用户必须重新打开它以将事件添加到其日历中。该行为未通过附件分析。他们将在Outlook的会议/日历预览窗口中自动打开,如下所示:
有没有办法将超链接的行为与附件的行为匹配?我想知道是否可以通过更改.ICS文件的属性来完成。这是我的通常结构化的方式:
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:[email protected]
ATTENDEE:[email protected]
SEQUENCE:0
SUMMARY:Event Summary
UID:{Sample UUID}
END:VEVENT
我也愿意如何最好地管理电子邮件主体中的事件名称与各自的。
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:[email protected]
ATTENDEE:[email protected]
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论