Update index.js
This commit is contained in:
parent
e5ea735a3d
commit
07e522f6a7
3
index.js
3
index.js
|
|
@ -185,7 +185,7 @@ async function sendMail(subject, body) {
|
||||||
const fileName = `items_sold_out_${year}_${month}_${day}.xlsx`;
|
const fileName = `items_sold_out_${year}_${month}_${day}.xlsx`;
|
||||||
|
|
||||||
const transporter = nodemailer.createTransport({
|
const transporter = nodemailer.createTransport({
|
||||||
host: process.env.MAIL_HOST,
|
host: process.env.MAIL_IP,
|
||||||
port: process.env.MAIL_PORT,
|
port: process.env.MAIL_PORT,
|
||||||
secure: true,
|
secure: true,
|
||||||
auth: {
|
auth: {
|
||||||
|
|
@ -194,6 +194,7 @@ async function sendMail(subject, body) {
|
||||||
},
|
},
|
||||||
connectionTimeout: 10000, // prevent timeout
|
connectionTimeout: 10000, // prevent timeout
|
||||||
pool: true, // reuse connection if many mails
|
pool: true, // reuse connection if many mails
|
||||||
|
tls: { servername: process.env.MAIL_HOST },
|
||||||
});
|
});
|
||||||
|
|
||||||
const mailOptions = {
|
const mailOptions = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue