Skip to content

Instantly share code, notes, and snippets.

@ivanstoyanov
Created May 2, 2013 21:05
Show Gist options
  • Save ivanstoyanov/5505461 to your computer and use it in GitHub Desktop.
Save ivanstoyanov/5505461 to your computer and use it in GitHub Desktop.
function onPostSave(request,response,modules){
var i, to, logger = modules.logger, email = modules.email;
for (i = 0; i < request.body.to.length; i++){
to = request.body.to[i];
logger.info("Sending e-mail to: " + to);
email.send('[email protected]',
to,
request.body.subject,
request.body.body,
request.body.reply_to);
}
response.continue();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment