weaver / node-mail

This SMTP client library for Node.JS helps you send email safely and easily.
113 stars 17 forks source link

[Bug] -- ECONNREFUSED #18

Open hugdubois opened 13 years ago

hugdubois commented 13 years ago

Hi,

I use node v0.4.8 and I have an error with this stack trace :

node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: ECONNREFUSED, Connection refused at Socket._onConnect (net.js:601:18) at IOWatcher.onWritable as callback

Perhaps you can fix this with add this code to ./node-mail/lib/smtp.js l.66:

..... this.sock .on('error', function(err) { self.emit('error', err); }) .once('connect', function() { .......

What do you think ?