diff options
author | scottmotte <scott@scottmotte.com> | 2013-07-23 10:15:51 -0700 |
---|---|---|
committer | scottmotte <scott@scottmotte.com> | 2013-07-23 10:15:51 -0700 |
commit | c7c8cc35a8f04c8c6c9fe0f413eb04ad0f9d5596 (patch) | |
tree | 2ae58682684df831321b77afb964ddf4dd5c57e0 /lib | |
parent | 0b49f89e7a40cc48248c3cfb16b15fbf3526241d (diff) | |
download | sendgrid-nodejs-c7c8cc35a8f04c8c6c9fe0f413eb04ad0f9d5596.zip sendgrid-nodejs-c7c8cc35a8f04c8c6c9fe0f413eb04ad0f9d5596.tar.gz sendgrid-nodejs-c7c8cc35a8f04c8c6c9fe0f413eb04ad0f9d5596.tar.bz2 |
Additional spec to display errors for smtp
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sendgrid.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sendgrid.js b/lib/sendgrid.js index 3320b36..15fee86 100644 --- a/lib/sendgrid.js +++ b/lib/sendgrid.js @@ -116,7 +116,7 @@ SendGrid.prototype.smtp = function(email, callback) { function send_smtp() { smtpTransport.sendMail(email.toSmtpFormat(), function(err, response) { smtpTransport.close(); - if(err) { return cb(error.data, null);} + if(err) { return cb(err.data, null);} return cb(null, {'message': 'success'}); }); |