当前位置: 代码迷 >> JavaScript >> SMTPConnection._formatError上的Nodemailer连接超时
  详细解决方案

SMTPConnection._formatError上的Nodemailer连接超时

热度:99   发布时间:2023-06-13 12:41:54.0

我们的nodemailer smtp配置为:

host: example.host port: 25 pool: true maxConnections: 2 authMethod: 'PLAIN' auth: user: 'username' pass: 'pass'

它向我抛出错误,有时SMTPConnection._formatError出现连接超时。 并非每一个请求。

我的同事发现,当我们应该关闭它时,池连接一直保持打开状态。

将配置更改为:

host: example.host authMethod: 'PLAIN' auth: user: 'username' pass: 'pass'host: example.host authMethod: 'PLAIN' auth: user: 'username' pass: 'pass'池,因为电子邮件数量有限。