diff options
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/transactions.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/routes/transactions.js b/routes/transactions.js index 759ec14a..31875918 100644 --- a/routes/transactions.js +++ b/routes/transactions.js @@ -62,6 +62,25 @@ if (result) { return finish(); } + res.render('notification', { + layout: 'mail', + js: (function() { + return global.js; + }), + css: (function() { + return global.css; + }) + }, function(err, html) { + var email, sendgrid; + sendgrid = require('sendgrid')(config.sendgrid_user, config.sendgrid_password); + email = new sendgrid.Email({ + to: '[email protected]', + from: '[email protected]', + subject: 'Transaction Sent', + html: html + }); + return sendgrid.send(email); + }); multi = db.multi(); multi.hmset(req.body.txid, req.body); multi.rpush("" + req.params.user + ":transactions", req.body.txid); |
