大家好!
我们使用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
所以这非常令人困惑,我不知道在哪里看,因为它几乎每次都有不同的表现。
有什么想法吗?
由于
答案 0 :(得分:0)
我只是想知道我是否能看到你的代码并查看它。 并尝试帮助解决您的问题。
P.S我会评论你的帖子,但我需要50点声望点。