You need to sign in to do that
Don't have an account?

Visualforce email with .ics attachment that works with Gmail
Hi,
I have created a visualforce email template that contains a .ics calendar invite attachment. The attachment works fine for desktop/phone apps. But Gmail (using the web interface) will not recognise the .ics file and give the "Add to Calendar" option in the message.
What I want is for the attached invite to appear in the email as so:

Instead, it just appears as a regular attachment, with the only option being to download it.
I have created a calendar event in google calendar, downloaded it and emailed it to myself, and it works as per the image above. However, I put the exact same code in my VF template and send a test, and the invite doesn't work as above.
Here is my vf code (note that there are no merge fields in the invite code because I'm simply trying to get a basic invite to work). Can anyone see where I am going wrong? Thanks
I have created a visualforce email template that contains a .ics calendar invite attachment. The attachment works fine for desktop/phone apps. But Gmail (using the web interface) will not recognise the .ics file and give the "Add to Calendar" option in the message.
What I want is for the attached invite to appear in the email as so:
Instead, it just appears as a regular attachment, with the only option being to download it.
I have created a calendar event in google calendar, downloaded it and emailed it to myself, and it works as per the image above. However, I put the exact same code in my VF template and send a test, and the invite doesn't work as above.
Here is my vf code (note that there are no merge fields in the invite code because I'm simply trying to get a basic invite to work). Can anyone see where I am going wrong? Thanks
<messaging:emailTemplate subject="Leave Request Approved" recipientType="User" relatedToType="Leave_Request__c"> <messaging:htmlEmailBody > <html> <style type="text/css"> ...my styling... </style> <body> ...my body content... </body> </html> </messaging:htmlEmailBody> <messaging:attachment filename="reminder.ics"> BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN BEGIN:VEVENT STATUS:CONFIRMED CREATED:20150507T054355Z UID:qjvkvr7gsf10erbp9vc2fk05ec@google.com DTEND;VALUE=DATE:20150510 TRANSP:TRANSPARENT SUMMARY:Test Summary DTSTART;VALUE=DATE:20150508 DTSTAMP:20150507T054355Z LAST-MODIFIED:20150507T054355Z SEQUENCE:0 DESCRIPTION:Test Description END:VEVENT END:VCALENDAR </messaging:attachment> </messaging:emailTemplate>
I have a similar requirement as yours. Were you able to get this issue resolved? if yes, please provide you valuable inputs.
Thanks
Jana