sendgrid / nodemailer-sendgrid-transport

SendGrid transport for Nodemailer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

connect ETIMEDOUT 169.50.207.103:443

mjodeh opened this issue · comments

Error: connect ETIMEDOUT 169.50.207.103:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14) {
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '169.50.207.103',
   port: 443
}

Node v10.0.0
OS: Ubuntu 18.04

Code:

const sendMail = async (to, subject, body) => {
  try {
    let info = await sendGridMail.send({
      from: process.env.EMAIL || "my test email",
      to,
      subject,
      html: body
    });
    console.log("email sent", info)
  } catch (ex) {
    console.log("send email failed", { to, subject }, ex);
  }
};