Marak / node_mailer

## Project deprecated, see README
MIT License
387 stars 64 forks source link

Unhandled exceptions crashing node #39

Open kenperkins opened 13 years ago

kenperkins commented 13 years ago

I've had a case where two different errors with my smtp server were both resulting in unhandled exceptions that crashed node.

v0.6.4 and node 0.4.8

// First problem happened when Google blocked our account, but this was causing node_error to throw an async unhandled exception

FATALNODEERROR::2011-08-04T06:41:48 STACK:Error: 535-5.7.1 Username and Password not accepted. Learn more at

535 5.7.1 http://mail.google.com/support/bin/answer.py?answer=14257 q4sm1075005ib b.49 at SMTPClient._dataListener (/usr/local/lib/node/mailer/node_modules/nodemail er/lib/smtp.js:466:29) at SMTPClient. (/usr/local/lib/node/mailer/node_modules/nodemailer/lib/smtp.js:643:14) at CleartextStream. (native) at CleartextStream.emit (events.js:64:17) at CleartextStream._push (tls.js:299:12) at SecurePair.cycle (tls.js:574:20) at EncryptedStream.write (tls.js:96:13) at Socket.ondata (stream.js:36:26) at Socket.emit (events.js:64:17) at Socket._onReadable (net.js:678:14) ARGUMENTS: TYPE: MESSAGE:535-5.7.1 Username and Password not accepted. Learn more at

535 5.7.1 http://mail.google.com/support/bin/answer.py?answer=14257 q4sm1075005ib b.49 TOSTRING:Error: 535-5.7.1 Username and Password not accepted. Learn more at

535 5.7.1 http://mail.google.com/support/bin/answer.py?answer=14257 q4sm1075005ib b.49

// Second problem was when we switched to a local mail server (exim4) for sending mail and we got this problem

FATALNODEERROR::2011-08-04T07:11:53 STACK:Error: Server responded with 421 admin-01 lost input connection at SMTPClient._handshakeListener (/usr/local/lib/node/mailer/node_modules/nod emailer/lib/smtp.js:502:21) at SMTPClient. (/usr/local/lib/node/mailer/node_modules/nodemailer /lib/smtp.js:628:21) at Socket. (native) at Socket.emit (events.js:64:17) at Socket._onReadable (net.js:678:14) at IOWatcher.onReadable as callback ARGUMENTS: TYPE: MESSAGE:Server responded with 421 admin-01 lost input connection TOSTRING:Error: Server responded with 421 admin-01 lost input connection

kenperkins commented 13 years ago

This happened to us unexpectedly in production and forced a panic switch to https://github.com/eleith/emailjs which worked without issue.

kenperkins commented 13 years ago

Accidental close.