testing 101

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-06-30 19:31:45 +08:00
parent 89acdfc239
commit 1372f4e975
62 changed files with 6696 additions and 281 deletions
+10 -3
View File
@@ -15,13 +15,20 @@
const nodemailer = require('nodemailer');
const { emailTemplates } = require('../data/email_body.data')
const port = Number(process.env.SMTP_PORT);
const transporter = nodemailer.createTransport({
host: process.env.SMTP_HOST,
port: Number(process.env.SMTP_PORT),
host: process.env.SMTP_HOST,
port,
secure: port === 465,
requireTLS: port === 587,
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASS,
},
tls: {
rejectUnauthorized: false,
},
});
const sendEmail = async ({ to, type, data = {} }) => {
@@ -39,7 +46,7 @@ const sendEmail = async ({ to, type, data = {} }) => {
{
from: {
name: "STARR System",
address: "do-not-reply@philproperties.com",
address: process.env.EMAIL_FROM,
},
to,
subject,