aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/modules/email-dispatcher.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/email-dispatcher.js')
-rw-r--r--modules/email-dispatcher.js36
1 files changed, 0 insertions, 36 deletions
diff --git a/modules/email-dispatcher.js b/modules/email-dispatcher.js
deleted file mode 100644
index b0c40a2..0000000
--- a/modules/email-dispatcher.js
+++ /dev/null
@@ -1,36 +0,0 @@
-
-var ES = require('../config/email-settings');
-var EM = {};
-module.exports = EM;
-
-EM.server = require("emailjs/email").server.connect({
-
- host : ES.host,
- user : ES.user,
- password : ES.password,
- ssl : true
-
-});
-
-EM.dispatchResetPasswordLink = function(account, callback)
-{
- EM.server.send({
- from : ES.sender,
- to : account.email,
- subject : 'Password Reset',
- text : 'something went wrong... :(',
- attachment : EM.composeEmail(account)
- }, callback );
-}
-
-EM.composeEmail = function(o)
-{
- var link = 'https://divid.no/reset-password?e='+o.email+'&p='+o.pass;
- var html = "<html><body>";
- html += "Hi "+o.name+",<br><br>";
- html += "Your username is :: <b>"+o.user+"</b><br><br>";
- html += "<a href='"+link+"'>Please click here to reset your password</a><br><br>";
- html += "Cheers<br>";
- html += "</body></html>";
- return [{data:html, alternative:true}];
-}