Permalink
Browse files

Merge pull request #122 from JoeWagner/ses_callback_args

Pass http response object to the SES sendMail callback
  • Loading branch information...
2 parents 744faad + ea19f2f commit 01b5d8a67b5ed880bad64a682c45748025b9c143 @andris9 andris9 committed Dec 15, 2012
Showing with 7 additions and 3 deletions.
  1. +6 −2 lib/engines/ses.js
  2. +1 −1 package.json
View
@@ -124,10 +124,14 @@ SESTransport.prototype.responseHandler = function(callback, response) {
}
if(response.statusCode != 200) {
return typeof callback == "function" &&
- callback(new Error('Email failed: ' + response.statusCode + '\n' + body), null);
+ callback(new Error('Email failed: ' + response.statusCode + '\n' + body), {
+ message: body,
+ response: response
+ });
}
return typeof callback == "function" && callback(null, {
- message: body
+ message: body,
+ response: response
});
});
};
View
@@ -1,7 +1,7 @@
{
"name": "nodemailer",
"description": "Easy to use module to send e-mails, supports unicode and SSL/TLS",
- "version": "0.3.35",
+ "version": "0.3.36",
"author" : "Andris Reinman",
"maintainers":[
{

0 comments on commit 01b5d8a

Please sign in to comment.