Skip to content
Snippets Groups Projects
Commit 377dc0b4 authored by Rémi PAPIN's avatar Rémi PAPIN
Browse files

Add montlyReport mail

parent 7dbf979f
Branches
Tags
1 merge request!120Add montlyReport mail
......@@ -25,7 +25,7 @@
"monthlyReport": {
"type": "node",
"file": "services/monthlyReport/ecolyo.js",
"trigger": "@cron 0 0 * * * *"
"trigger": "@cron 0 0 3 * *"
}
},
"permissions": {
......
This diff is collapsed.
This diff is collapsed.
......@@ -105,13 +105,14 @@ const monthlyReport = async ({ client }: MonthlyReportProps) => {
}
log('info', 'Creation of mail...')
const mailContent = createEmail(
username,
url,
periodLabel,
monthlyPerformance
)
const mailService = new MailService()
// const mailContent = createEmail(
// username,
// url,
// periodLabel,
// monthlyPerformance
// )
const mailContent = mailService.CreateBodyMonthlyReport(username, url)
const mailData = {
mode: 'noreply',
subject: '[Ecolyo] - Votre bilan mensuel',
......@@ -123,7 +124,6 @@ const monthlyReport = async ({ client }: MonthlyReportProps) => {
],
}
log('info', 'Sending mail...')
const mailService = new MailService()
mailService.SendMail(client, mailData)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment