eleith / emailjs

html emails and attachments to any smtp server with nodejs
MIT License
2.19k stars 230 forks source link

tls.js crashes with SecurePair error (0.3.10 + 0.3.11) #109

Closed rcwwilliams closed 10 years ago

rcwwilliams commented 10 years ago

Hi

Emailjs was working beautifully with 0.3.9. I am using a tls connection on port 587 to a mandrill SMTP server.

host: "smtp.mandrillapp.com",
tls: true,
port: 587

When I upgraded to emailjs 0.3.11, my node server crashed (see stacktrace below) when trying to send an email. I also tried 0.3.10 with the same issue. Have reverted to 0.3.9 for the time being which still works fine.

Below is the stacktrace.

Thanks

Robin

events.js:72 throw er; // Unhandled 'error' event ^ Error: socket hang up at SecurePair.error (tls.js:1008:23) at EncryptedStream.CryptoStream._done (tls.js:700:22) at CleartextStream.read as _read at CleartextStream.Readable.read (_stream_readable.js:323:10) at EncryptedStream.onCryptoStreamFinish (tls.js:301:47) at EncryptedStream.g (events.js:180:16) at EncryptedStream.emit (events.js:117:20) at finishMaybe (_stream_writable.js:360:12) at endWritable (_stream_writable.js:367:3) at EncryptedStream.Writable.end (_stream_writable.js:345:5)

eleith commented 10 years ago

i added an error handler and reverted stream to flow mode. try again and hopefully the error will be handled this time.