我正在尝试通过在前端提交联系表单来将nodejs应用程序与SendGrid集成
因此from
邮件可以是任何一个
而to
将是我
我收到了这个消息
sendGrid.setApiKey(process.env.MY_SENDGRID_API_KEY);
const msg = {
to: '[email protected],
from: "[email protected]",
subject: 'Sending with SendGrid is Fun',
text: message,
html: `<strong>${name} is trying to get in touch with you!</strong>`,
};
return sendGrid.send(msg);
"message": "The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements",
不支持该用例。 发件人必须是经过验证的发件人身份: https :
@ childish-sambino嘘
@ a5okol @thinkingserious
即使我已经成功完成了单个发件人的验证,我仍然会收到此错误!
最有用的评论
您需要验证作为发件人的邮件。 我以这种方式解决了这个问题:
到这里:
设置->发件人身份验证->单发件人验证->验证地址
例
然后,填写右侧的表格,并完成对发件人邮件的验证。
您可以在这里阅读更多详细信息。