Add admin email notifications

This commit is contained in:
Kurt Hutten
2021-06-29 16:21:28 +10:00
parent 0da15443cb
commit 98d1b0643d
2 changed files with 19 additions and 1 deletions

View File

@@ -9,10 +9,18 @@ export const sendAllUsersEmail = async ({input: {body, subject}}) => {
address:'news@mail.cadhub.xyz',
name: 'CadHub',
}
return sendMail({
const result = await sendMail({
to: recipients,
from,
subject,
text: body,
})
await sendMail({
to: 'k.hutten@protonmail.ch',
from,
subject: `All users email report`,
text: JSON.stringify(result, null, 2),
})
return result
}