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 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误