Nodemailer语言 - 有时会使应用程序崩溃,有时可以完美运行



大家好!

我们使用 Nodemailer 在新会员注册时发送确认电子邮件。到目前为止,它一直运作良好。但今天,它只是令人困惑。

  • 有时,当我使用一次性电子邮件地址检查时,它正在工作,我正在接收电子邮件并且应用程序工作正常。

- 有时它会使应用程序崩溃,我没有收到带有错误的电子邮件,例如

2018-03-22T17:26:21.374374+00:00 app[web.1]: [0] { Error: connect ECONNREFUSED 217.70.178.9:587
2018-03-22T17:26:21.374387+00:00 app[web.1]: [0]     at Object._errnoException (util.js:1022:11)
2018-03-22T17:26:21.374389+00:00 app[web.1]: [0]     at _exceptionWithHostPort (util.js:1044:20)
2018-03-22T17:26:21.374392+00:00 app[web.1]: [0]     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
2018-03-22T17:26:21.374394+00:00 app[web.1]: [0]   code: 'ECONNECTION',
2018-03-22T17:26:21.374395+00:00 app[web.1]: [0]   errno: 'ECONNREFUSED',
2018-03-22T17:26:21.374397+00:00 app[web.1]: [0]   syscall: 'connect',
2018-03-22T17:26:21.374399+00:00 app[web.1]: [0]   address: '217.70.178.9',
2018-03-22T17:26:21.374400+00:00 app[web.1]: [0]   port: 587,
2018-03-22T17:26:21.374402+00:00 app[web.1]: [0]   command: 'CONN' }
2018-03-22T17:26:21.375415+00:00 app[web.1]: [0] /app/server/passport/local-signup.js:39
2018-03-22T17:26:21.375418+00:00 app[web.1]: [0]       res.end("error");
2018-03-22T17:26:21.375420+00:00 app[web.1]: [0]       ^
2018-03-22T17:26:21.375421+00:00 app[web.1]: [0] 
2018-03-22T17:26:21.375423+00:00 app[web.1]: [0] ReferenceError: res is not defined
2018-03-22T17:26:21.375425+00:00 app[web.1]: [0]     at /app/server/passport/local-signup.js:39:7
2018-03-22T17:26:21.375427+00:00 app[web.1]: [0]     at transporter.send.args (/app/server/node_modules/nodemailer/lib/mailer/index.js:224:21)
2018-03-22T17:26:21.375431+00:00 app[web.1]: [0]     at SMTPConnection.connection.once.err (/app/server/node_modules/nodemailer/lib/smtp-transport/index.js:174:24)
2018-03-22T17:26:21.375433+00:00 app[web.1]: [0]     at Object.onceWrapper (events.js:315:30)
2018-03-22T17:26:21.375435+00:00 app[web.1]: [0]     at emitOne (events.js:116:13)
2018-03-22T17:26:21.375437+00:00 app[web.1]: [0]     at SMTPConnection.emit (events.js:211:7)
2018-03-22T17:26:21.375439+00:00 app[web.1]: [0]     at SMTPConnection._onError (/app/server/node_modules/nodemailer/lib/smtp-connection/index.js:596:14)
2018-03-22T17:26:21.375441+00:00 app[web.1]: [0]     at Socket._socket.on.err (/app/server/node_modules/nodemailer/lib/smtp-connection/index.js:265:18)
2018-03-22T17:26:21.375443+00:00 app[web.1]: [0]     at emitOne (events.js:116:13)
2018-03-22T17:26:21.375444+00:00 app[web.1]: [0]     at Socket.emit (events.js:211:7)
2018-03-22T17:26:21.375446+00:00 app[web.1]: [0]     at emitErrorNT (internal/streams/destroy.js:64:8)
2018-03-22T17:26:21.375448+00:00 app[web.1]: [0]     at _combinedTickCallback (internal/process/next_tick.js:138:11)
2018-03-22T17:26:21.375450+00:00 app[web.1]: [0]     at process._tickCallback (internal/process/next_tick.js:180:9)

最后我也遇到了这样的错误

response: '554 5.7.1 Service unavilable; Client host [54.196.145.154] blocked you may be infected see http://postmaster.gandi.net

所以这非常令人困惑,考虑到它几乎每次的行为都不同,我真的不知道去哪里看。

知道吗?

谢谢

我只是想知道我是否可以看到您的代码并查看它。并尝试帮助您解决问题。

附言我会评论你的帖子,但我需要 50 个声誉点才能做到这一点。

最新更新