本文介绍了错误:在TLSWrap.onStreamRead中读取ECONNRESET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我试图使用@ sendgrid/email库在我的nodejs应用程序中发送电子邮件,但是当我尝试发送电子邮件时,出现以下错误:

I am trying to send an email in my nodejs app using @sendgrid/email library but when I try to send an email I am getting the following error:


我尝试了以下代码,请看一下.


I tried the following code please have a look.

const sgMail = require('@sendgrid/mail');
sgMail.setApiKey('***************************'); // API KEY
sgMail.send({
  to: email,
  from: 's*****@gmail.com',
  subject: 'signup succeeded!',
  html: '<h1>You Successfully Signed Up!</h1>'
})

如何解决此问题?

推荐答案

检查您是否在代理后面.当您的发送计算机无法连接到sendgrid api服务器时,会发生此错误.

Check if you are behind proxy.This error occurs when your sending machine is not able to connect to sendgrid api server.

这篇关于错误:在TLSWrap.onStreamRead中读取ECONNRESET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 00:05