Added basic RBAC component BOD-232
This commit is contained in:
35
sendemail.js
35
sendemail.js
@@ -1,4 +1,3 @@
|
||||
var nodemailer = require("nodemailer");
|
||||
const path = require("path");
|
||||
require("dotenv").config({
|
||||
path: path.resolve(
|
||||
@@ -77,21 +76,21 @@ exports.sendEmail = (req, res) => {
|
||||
// );
|
||||
};
|
||||
|
||||
var transporter = nodemailer.createTransport({
|
||||
host: process.env.email_server,
|
||||
port: 465,
|
||||
secure: true, // upgrade later with STARTTLS
|
||||
auth: {
|
||||
user: process.env.email_api,
|
||||
pass: process.env.email_secret,
|
||||
},
|
||||
});
|
||||
// var transporter = nodemailer.createTransport({
|
||||
// host: process.env.email_server,
|
||||
// port: 465,
|
||||
// secure: true, // upgrade later with STARTTLS
|
||||
// auth: {
|
||||
// user: process.env.email_api,
|
||||
// pass: process.env.email_secret,
|
||||
// },
|
||||
// });
|
||||
|
||||
// verify connection configuration
|
||||
transporter.verify(function (error, success) {
|
||||
if (error) {
|
||||
console.log(error);
|
||||
} else {
|
||||
console.log("[EMAIL] Succesfully connected to SMTP server.");
|
||||
}
|
||||
});
|
||||
// // verify connection configuration
|
||||
// transporter.verify(function (error, success) {
|
||||
// if (error) {
|
||||
// console.log(error);
|
||||
// } else {
|
||||
// console.log("[EMAIL] Succesfully connected to SMTP server.");
|
||||
// }
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user