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);