andris9/Nodemailer — pull request #66 by seppuku (2012-02-08 01:53:27+00:00)
Title: Proposed changes to send callback

Hi,

I've been using node mailer for sometime now and feel the callback can be simplified a bit. Instead of returning a status if email was sent successfully, how about changing it to be called only when there's an error. So success is more of an implied action.

This way if an error occurs a dev can get more detailed info on why an email wasn't sent and act on it. Another idea is to create a true status object that looks like this. { status: true/false, response: 'response from MTA' }

Let me know what you think.

-Ardie