Guest User

Untitled

a guest
Feb 10th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. var outbound = require('./outbound');
  2. var constants = require('./constants');
  3. exports.hook_queue = function (next, connection) {
  4. var transaction = connection.transaction;
  5.  
  6. outbound.send_email(connection.transaction, function(retval, msg) {
  7. switch(retval) {
  8. case constants.ok:
  9. return next(OK, msg);
  10. break;
  11. case constants.deny:
  12. return next(DENY, msg);
  13. break;
  14. default:
  15. return next(DENYSOFT, msg);
  16. }
  17. });
  18. }
  19.  
  20. exports.hook_get_mx = function (next, hmail, domain) {
  21. var mx = {
  22. priority: 0,
  23. exchange: 'ip',
  24. auth_user: 'user',
  25. auth_pass: 'pass',
  26. port: 587,
  27. }
  28. return next(OK, mx);
  29. }
  30.  
  31.  
  32. exports.hook_queue_outbound = exports.hook_queue;
Add Comment
Please, Sign In to add comment