Error: connect ECONNREFUSED 127.0.0.1:465 nodemailer

后端 未结 4 888
礼貌的吻别
礼貌的吻别 2021-01-17 14:50

I was using my gmail account to send an smtp alert messages to my users email . Example, registration or account blocked etc. I am using a nodemailer and was email were sent

4条回答
  •  隐瞒了意图╮
    2021-01-17 15:42

    I was using secure: false and I faced the same issue on production and below was the solution that worked for me:

    const transporter = nodemailer.createTransport({
      host: ,
      port: 25,
      secure: false,
      logger: true,
      debug: true,
      ignoreTLS: true // add this 
    });
    

    Hope this will help someone.

提交回复
热议问题