Compare commits
No commits in common. "062efd940f12d0dbbbadc4c3c39555066a7dbb74" and "bd574498199b6a35c1927306547291dc23825429" have entirely different histories.
062efd940f
...
bd57449819
1
app.js
1
app.js
|
@ -47,6 +47,7 @@ app.use((err, req, res, next) => {
|
||||||
|
|
||||||
// Express Submodules:
|
// Express Submodules:
|
||||||
app.use(express.json()); //JSON Parsing for POST Requests
|
app.use(express.json()); //JSON Parsing for POST Requests
|
||||||
|
//STATIC CONTENT NO LONGER SERVED FROM NODE
|
||||||
app.use(compression()) // Compress API Data if supported by client
|
app.use(compression()) // Compress API Data if supported by client
|
||||||
|
|
||||||
// Express Routes
|
// Express Routes
|
||||||
|
|
|
@ -2,34 +2,9 @@ const log = require('../utils/log.utils')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const mail = require('node-mailer'); //>> Probs wrong
|
const mail = require('node-mailer'); //>> Probs wrong
|
||||||
|
|
||||||
const fromAdrr = process.env.OWL_EML_FROM
|
|
||||||
const smtpUser = process.env.OWL_EML_USER
|
|
||||||
const smtpPass = process.env.OWL_EML_PASS
|
|
||||||
const smtpHost = process.env.OWL_EML_HOST
|
|
||||||
const smtpPort = process.env.OWL_EML_PORT
|
|
||||||
|
|
||||||
const options = {
|
async function sendTest() {
|
||||||
host: smtpHost,
|
|
||||||
port: smtpPort,
|
|
||||||
secure: true,
|
|
||||||
auth: {
|
|
||||||
user: smtpUser,
|
|
||||||
pass: smtpPass
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let transporter = nodemailer.createTransport(options)
|
|
||||||
|
|
||||||
async function sendTest(to, subject, plaintext, html) {
|
|
||||||
log.out(`mailServices.sendTest: Sending test message to: ${to}, subject: ${subject}`, "info")
|
|
||||||
// Send test mail message
|
// Send test mail message
|
||||||
let res = await transporter.sendMail({
|
|
||||||
from: fromAdrr,
|
|
||||||
to: to,
|
|
||||||
subject: subject,
|
|
||||||
text: plaintext,
|
|
||||||
html: html
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,9 +15,3 @@ async function sendRegister() {
|
||||||
async function sendAlert() {
|
async function sendAlert() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
sendTest,
|
|
||||||
sendRegister,
|
|
||||||
sendAlert
|
|
||||||
}
|
|
Loading…
Reference in New Issue