Update index.js

This commit is contained in:
nguyentrungthat 2025-10-22 15:04:25 +07:00
parent e5ea735a3d
commit 07e522f6a7
1 changed files with 2 additions and 1 deletions

View File

@ -185,7 +185,7 @@ async function sendMail(subject, body) {
const fileName = `items_sold_out_${year}_${month}_${day}.xlsx`;
const transporter = nodemailer.createTransport({
host: process.env.MAIL_HOST,
host: process.env.MAIL_IP,
port: process.env.MAIL_PORT,
secure: true,
auth: {
@ -194,6 +194,7 @@ async function sendMail(subject, body) {
},
connectionTimeout: 10000, // prevent timeout
pool: true, // reuse connection if many mails
tls: { servername: process.env.MAIL_HOST },
});
const mailOptions = {