From 53e5de472c3b75d2ff121ef4ef0680d663716b1c Mon Sep 17 00:00:00 2001 From: nguyentrungthat <80239428+nguentrungthat@users.noreply.github.com> Date: Thu, 4 Dec 2025 08:06:17 +0700 Subject: [PATCH] Update index.js --- index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 22aed88..0dc08c6 100644 --- a/index.js +++ b/index.js @@ -272,17 +272,20 @@ async function sendMail(subject, body) { tls: { servername: process.env.MAIL_HOST }, }); + // add link to google drive in email body + const bodyEmail = `\nYou can see the Excel file from Google Drive.\n${`https://docs.google.com/spreadsheets/d/${process.env.GOOGLE_DRIVE_FILE_ID}/view`}\n\n\n${body}`; + const mailOptions = { from: process.env.MAIL_USERNAME, to: EMAILS.join(","), subject, - text: body, - attachments: [ - { - filename: fileName, - content: response.data, // attach from memory - }, - ], + text: bodyEmail, + // attachments: [ + // { + // filename: fileName, + // content: response.data, // attach from memory + // }, + // ], }; await transporter.sendMail(mailOptions);