Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bundle the callback associated with this specific message in with the…

… message itself, and call that once it can been sent.
  • Loading branch information...
commit c7a03f0ca78f99286c89266e346b61d44d51ca08 1 parent 78537c7
@smurthas authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/node_mailer.js
View
3  lib/node_mailer.js
@@ -86,6 +86,7 @@ function merge(x,y) {
var pool = new SMTPClientPool();
exports.send = function node_mail(message, callback) {
+ message._callback = callback;
var server = {
host: message.host,
hostname: message.domain,
@@ -147,7 +148,7 @@ exports.send = function node_mail(message, callback) {
_templateCache[message.template].queue.push(message);
_templateCache[message.template].queue.forEach(function(msg, i){
msg.html = mustache.to_html(_templateCache[message.template].template, msg.data);
- dispatchMail(msg, server, callback);
+ dispatchMail(msg, server, msg._callback);
});
// Clear the queue out
Please sign in to comment.
Something went wrong with that request. Please try again.