mscdex/node-imap — pull request #144 by NodePing (2013-01-08 18:16:58+00:00)
Title: Catch 'error' events from SSL connection

If you try to connect using 'secure:true' to a non-ssl port like 143, you get an error event. This catches that and other SSL connection errors and passes them up where they can be seen instead of crashing the process with an unhandled 'error' event.