Sendgrid-nodejs: 发件人地址不匹配

创建于 2020-04-08  ·  4评论  ·  资料来源: sendgrid/sendgrid-nodejs

发行摘要

我正在尝试通过在前端提交联系表单来将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",

技术细节:

  • sendgrid-nodejs版本:最新
  • 节点版本:10.16.0
question

最有用的评论

您需要验证作为发件人的邮件。 我以这种方式解决了这个问题:

到这里:
设置->发件人身份验证->单发件人验证->验证地址

然后,填写右侧的表格,并完成对发件人邮件的验证。

您可以在这里阅读更多详细信息。

所有4条评论

不支持该用例。 发件人必须是经过验证的发件人身份: https

@ childish-sambino嘘

您需要验证作为发件人的邮件。 我以这种方式解决了这个问题:

到这里:
设置->发件人身份验证->单发件人验证->验证地址

然后,填写右侧的表格,并完成对发件人邮件的验证。

您可以在这里阅读更多详细信息。

@ a5okol @thinkingserious
即使我已经成功完成了单个发件人的验证,我仍然会收到此错误!
sendgrid

此页面是否有帮助?
0 / 5 - 0 等级