Skip to content

Commit

Permalink
Merge pull request #122 from JoeWagner/ses_callback_args
Browse files Browse the repository at this point in the history
Pass http response object to the SES sendMail callback
  • Loading branch information
andris9 committed Dec 15, 2012
2 parents 744faad + ea19f2f commit 01b5d8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/engines/ses.js
Expand Up @@ -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
});
});
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -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":[
{
Expand Down

0 comments on commit 01b5d8a

Please sign in to comment.