Nodemailer 以 SendGrid 身份发送电子邮件时出现 SSL 错误

ssl error with nodemailer sending email as sendgrid

提问人:Giacomo Cardillo 提问时间:11/2/2023 更新时间:11/2/2023 访问量:20

问:

我在 nodejs v:6.9.x.x 上使用 NodeMailer v: 18.x.x 使用 SendGrid 发送电子邮件,但我遇到了这个错误:

[错误:C0E743FEB83E0000:错误:0A00010B:SSL例程:ssl3_get_record:错误的版本号:../deps/openssl/openssl/ssl/record/ssl3_record.c:354: ] { library: 'SSL 例程', 原因:“错误的版本号”, 代码: 'ESOCKET', 命令: 'CONN' } 下面我粘贴了我创建的传输的定义,以使用 SendGrid 发送电子邮件:

const transporter = nodemailer.createTransport({
  service: "SendGrid",
  secure:true,
  auth: {
    // TODO: replace `user` and `pass` values from <https://forwardemail.net>
    api_key: sendgridApiKey.value(),
    //user: sendgridApiKey.value()
  }
});

你能帮忙解决这个错误吗?如果它可能有帮助,我将电子邮件发送作为 Firebase 上的云功能部署

节点.js firebase sendgrid nodemailer

评论


答: 暂无答案