duansan9435 2018-07-06 19:10
浏览 279

在PHP电子邮件中添加到日历按钮

I have a form that people can fill out that allow them to select a date and time for an event. The form submits an email with all the form information.

I am trying to add a button in the email that's received to add the event to an Outlook calendar. I am able to make it work with Google, but not Outlook.

The email is being submitted via custom PHP. I tried AddToCalendar, but it won't work because email won't accept the JS that you need to run AddToCalendar. Even if there's a way to make the button download a custom .ics file, that's ok.

Any ideas or help with this is greatly appreciated. I can post any code if needed.

  • 写回答

1条回答 默认 最新

  • douyun1546 2018-08-02 14:04
    关注

    "Add to Calendar" buttons can't be added to emails because emails can't execute Javascript. Therefore you should use "Add to Calendar" links instead.

    At AddEvent.com we offer a simple "Events" tool which allows you to generate an event, copy the "Add to Calendar" links and paste them into your email/newsletter. The tool can be found here: https://www.addevent.com/events

    What you alternatively can do is to create an event using a client/program like Outlook, save the event as a .ics file and attach it to your email. Most calendar vendors will detect the .ics file and offer an "Add to Calendar" link - at least Gmail does that.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog