andris9/Nodemailer — pull request #224 by haraldrudell (2013-12-17 00:08:06+00:00)
Title: sendmail transport: better exception handling, wait for sendmail complet...

Improvements to nodemailer 0.5.15:

sendmail transport:
- Capture possible exceptions thrown by child_process.spawn.
- Capture possible exceptions when writing to the sendmail process' stdin.
- Wait to fire callback until the sendmail process has both exited successfully and closed its stdio.
- Listen for errors emitted by the sendmail process

As things were before:
* SendmailTransport.prototype.sendMail could throw exception despite having a callback.
* EPIPE exceptions was thrown after nodemailer had been successfully closed.
* ENOENT exceptions for a sendmail executable not found was thrown after nodemailer had been successfully closed.