summaryrefslogtreecommitdiffstats
path: root/server/lib/nodemailer.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/nodemailer.js')
-rw-r--r--server/lib/nodemailer.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/server/lib/nodemailer.js b/server/lib/nodemailer.js
deleted file mode 100644
index ba8f43d..0000000
--- a/server/lib/nodemailer.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* global __appdir */
-var path = require('path')
-var nodemailer = require('nodemailer')
-var config = require(path.join(__appdir, 'config', 'email'))
-
-module.exports = {
- sendMail: function (req, res) {
- var transporter = nodemailer.createTransport({
- host: 'smtp.gmail.com',
-
- auth: {
- type: 'OAuth2',
- user: 'bootauswahlserver@gmail.com',
- clientId: '240716905262-md0hee9bqgrju4a28oe3k4u0s063l7na.apps.googleusercontent.com',
- clientSecret: 'VetTt8xiNEOy6Nugf_QKk_vN',
- refreshToken: '1/srkyBhhzaAK6cM7Mio797OrzA8bbszRoK2PTwnbcRDE',
- accessToken: 'ya29.GlvIBXW2439F0xGw9D2L3OtUWNgpks7EtVq25tZXwsxDyNu1NnRsTCNleqIi5q1MD0mJCATaxGsYkLTMG8ER9A-z-cFXHiOETOSUXng2eA_K43YHcgyKiy-SfBrn'
- }
- })
-
- const mailOptions = {
- from: config.user, // sender address
- to: 'thejannik@yahoo.de', // list of receivers
- subject: 'Nodemailer test mail', // Subject line
- html: '<p>Some fancy html mail stuff</p>'// plain text body
- }
-
- transporter.sendMail(mailOptions, function (err, info) {
- if (err) console.log(err)
- else console.log(info)
-
- return res.status(200).send({ status: 'success' })
- })
- }
-}