Created
April 6, 2016 12:00
-
-
Save shaikh-shahid/1b887c14cb994869263a4876e1a90908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async'); | |
var emails = ["[email protected]","[email protected]"]; | |
async.each(emails,function(singleEmail,callback) { | |
async.waterfall([ | |
function(callback) { | |
// code to send email. | |
callback(null,Flag); | |
}, | |
function(emailSentOrNot,callback) { | |
// Update DB. | |
} | |
],function(err,data) { | |
}); | |
},function(err,data) { | |
// Once all done, comes here. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment