mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-04-05 08:54:17 -04:00
Implemented email connect template. Implemented qr.js for Scan to Connect. Updated README.md. Updated email_example.png screenshot
This commit is contained in:
@@ -10,6 +10,7 @@ const nodemailer = require('nodemailer');
|
||||
*/
|
||||
const variables = require('./variables');
|
||||
const log = require('./log');
|
||||
const qr = require('./qr');
|
||||
|
||||
/**
|
||||
* Import own utils
|
||||
@@ -50,6 +51,8 @@ module.exports = {
|
||||
text: `Hi there,\n\nSomeone generated a WiFi Voucher, please use this code when connecting:\n\n${voucher.code.slice(0, 5)}-${voucher.code.slice(5)}`,
|
||||
html: ejs.render(fs.readFileSync(`${__dirname}/../template/email/voucher.ejs`, 'utf-8'), {
|
||||
voucher,
|
||||
unifiSsid: variables.unifiSsid,
|
||||
qr: await qr(),
|
||||
timeConvert: time,
|
||||
bytesConvert: bytes
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user