-
Notifications
You must be signed in to change notification settings - Fork 782
Description
Issue Summary
I have been trying to get including an ics attachment working for Gmail, so that it shows up as an invitation that the user can accept, reject, etc. I've been trying to use issues such as #217 (and others, from other sendgrid languages) to try to get this to work, but I have had no success. I was hoping someone could point me to (recent) examples or walk me through where I am going wrong.
If I include method: 'REQUEST
in the .ics file and method=REQUEST
in the attachment type
, it does not show up in Gmail as an invitation at all.
If I remove those, it shows up but without the inline buttons to attend, reject, etc.:
Code Snippet
const msg = {
to: '',
from: '',
subject: '',
html: html
};
msg.attachments = [{
content: Buffer.from(icsValue).toString('base64'),
filename: 'invite.ics',
type: 'text/calendar; method=REQUEST',
disposition: 'attachment',
}];
sgMail.send(msg);
I am using adamgibbons/ics for creating the .ics file, and I am including method: 'REQUEST'
, and the output from running this is the icsValue
in the snippet above.
Technical details:
- sendgrid-nodejs version: 7.0.0; also tried 7.1.1
- node version: 12.18.0