diff --git a/index.js b/index.js index 43c47b4..bf61271 100644 --- a/index.js +++ b/index.js @@ -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 = {