Looking for direction -> to include a .ics file in a webform generated email

Created on 6 March 2021, almost 4 years ago
Updated 15 April 2023, over 1 year ago

Problem/Motivation

I'm looking for some direction!

After experimenting with calendar links in the Email generated by webform module and including calendar links (ics and gcal) and running into some issues -> Problem we're having with just links in the Email is that Gmail completely strips the ical link.

Reading/looking to see what other providers are doing to handle this -> it looks like attaching a ics file is the way to go.

Example: (I just got a reminder from the orthodontist for Monday

Is there a way for us to add an attachment to the Email handler?

We can get at all the bits of data we would need and twig is awesome.

Dear {{ data.civicrm_2_contact_1_contact_first_name }},
An appointment with {{ data.civicrm_3_contact_1_contact_first_name }} {{ data.civicrm_3_contact_1_contact_last_name }} has been scheduled to take place on <br/><br/>{{ (data.civicrm_1_activity_1_activity_activity_date_time ~ ' ')|slice(0,25)|upper }} - {{ (data.civicrm_1_activity_1_activity_activity_date_time_timepart ~ ' ')|slice(0,5)|upper }}
<br/><br/>
{% set dateStartString = [ data.civicrm_1_activity_1_activity_activity_date_time|date('Y-m-d'), data.civicrm_1_activity_1_activity_activity_date_time_timepart ]|join(' ') %}
{% set addMinutes = [ '+', data.civicrm_1_activity_1_activity_duration, 'minutes' ]|join(' ') %}
{% set dateStart = date(dateStartString) %}
{% set dateEnd = dateStart|date_modify(addMinutes) %}
{% set gcalLink = calendar_link('google', 'ACE Appointment', dateStart, dateEnd, 0, '', 'SACE') %}
{% set icalLink = calendar_link('ics', 'ACE Appointment', dateStart, dateEnd, 0, '', 'SACE') %}
<a href="{{ gcalLink }}">Add to Google Calendar</a>
<a href="{{ icalLink }}">Add to Calendar</a>

Have you ever given ics/file attachments any thought for easy add to Calendar functionality? We can help make this happen - but curious what your thoughts are on the best way to implement this.

💬 Support request
Status

Closed: works as designed

Version

6.0

Component

Code

Created by

🇨🇦Canada karing 🇨🇦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024