Add task completion mails

This commit is contained in:
Jonas Lochmann
2020-12-21 01:00:00 +01:00
parent 2acee613f6
commit 13ede06a91
13 changed files with 541 additions and 8 deletions
+14
View File
@@ -86,6 +86,20 @@ export const sendUninstallWarningMail = async ({ receiver, deviceName }: {
})
}
export const sendTaskDoneMail = async ({ receiver, child, task }: {
receiver: string
child: string
task: string
}) => {
await email.send({
template: join(__dirname, '../../other/mail/taskdone'),
message: {
to: receiver
},
locals: { child, task, mailimprint }
})
}
export function isMailServerBlacklisted (mail: string): boolean {
const parts = mail.split('@')
const domain = parts[parts.length - 1]