nodemailer gmail connection closed with high number of mails

后端 未结 2 1167
执笔经年
执笔经年 2021-01-20 06:51

I have exactly the same issue as this post : Send multipe emails using nodemailer and gmail

When sending too many emails with nodemailer and gmail, I get a 421 error

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-20 07:30

    You should add the pool parameter to your nodemailer transporter config object:

    export const transporter = nodemailer.createTransport({
      service: 'gmail',
      auth: {},
      pool: true
    });
    

    For additional configuration options, you can check here

提交回复
热议问题