关于如何使用Javascript向与会者发送事件电子邮件提醒(Outlook或Gmail),开始时间,结束时间,开始日期,结束日期和位置的任何想法?
谢谢!
答案 0 :(得分:0)
您可以使用SendGrid's JavaScript web API。首先,您需要一个SendGrid account。然后,您可以通过NPM(说明here)安装其库。接下来,您需要一系列与会者的电子邮件地址:
var attendees = [attendee1@example.com, attendee2@example.com, attendee3@example.com];
然后您可以像这样使用API:
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.YOUR_SENDGRID_API_KEY);
const msg = {
to: attendees,
from: 'reminder@example.com',
subject: 'You have an upcoming event!',
text: 'Start time: ' + startTimeVariable + ' Start date: ' + startDateVariable +
' End time: ' + endTimeVariable + ' End date: ' + endDateVariable +
' Location: ' + locationVariable
};
sgMail.send(msg);