代码之家  ›  专栏  ›  技术社区  ›  leogoesger

使用@sendgrid/mail设置sendgrid

  •  0
  • leogoesger  · 技术社区  · 6 年前

    {错误:connect ETIMEDOUT 169.45.89.179:443
    地址:“169.45.89.179”,端口:443}[bugsnag]报告了 未处理的拒绝错误:错误:connect ETIMEDOUT 169.45.89.179:443 在SendGrid.send.then.catch.e(/home/leoqiu/foodnome api/build/src/utils/emailHelpers.js:143:11个)

    我的节点服务器用以下代码发送它:

    export const sendVerifyMail = (to: string, token: string) =>
      SendGrid.send({
        to,
        from: { email: '..' },
        subject: 'Verify you..',
        dynamic_template_data: {
          header: 'Verify your account',
          text:
            'Please use the button below to continue the process.',
          c2a_link: `${serverAddress}/api/user-account/verify?token=${token}`,
          c2a_button: 'Verify'
        },
        template_id: 'd-0f6411434fbc4896bf389e3945affd5d'
      } as any)
        .then(d => d)
        .catch(e => {
          console.log(e);
          throw new Error(e);
        });
    
    0 回复  |  直到 6 年前
        1
  •  1
  •   NiallJG    6 年前

    我不认为这是你的代码或网络的问题,除非你同时有一般的连接问题。

    如果您的连接不是问题所在,我只会向他们报告您准备共享的任何日志、源ip和超时错误发生的时间可能对他们有用