Skip to content

Instantly share code, notes, and snippets.

@smfreegard
Last active April 29, 2016 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smfreegard/ff79d02aeb94b9065359 to your computer and use it in GitHub Desktop.
Save smfreegard/ff79d02aeb94b9065359 to your computer and use it in GitHub Desktop.
var outbound = require('./outbound');
var constants = require('./constants');
exports.hook_queue = function (next, connection) {
var transaction = connection.transaction;
outbound.send_email(connection.transaction, function(retval, msg) {
switch(retval) {
case constants.ok:
return next(OK, msg);
break;
case constants.deny:
return next(DENY, msg);
break;
default:
return next(DENYSOFT, msg);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment