我目前正在使用带有Node.js的SendGrid电子邮件API,以在GitHub上使用其示例代码发送电子邮件。
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
const msg = {
to: 'test@example.com',
from: 'test@example.com',
subject: 'Sending with Twilio SendGrid is Fun',
text: 'and easy to do anywhere, even with Node.js',
html: '<strong>and easy to do anywhere, even with Node.js</strong>',
};
sgMail.send(msg);
我希望能够在我的应用程序中显示此电子邮件的传递状态。 使用SendGrid API是否可以实现,如果可以,我应该怎么做?
谢谢
答案 0 :(得分:0)
Sendgrid具有网络钩子,可以使用已传送或已延迟的信息来更新您的应用。这是链接https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook/ 并在此处查找sendgrid可以向您发送https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook/
的不同回复