Merge of of PR #827
This commit is contained in:
parent
2204bbe70c
commit
57907f9260
2 changed files with 6 additions and 6 deletions
|
@ -163,13 +163,13 @@ async function remove(context, id) {
|
|||
}
|
||||
|
||||
async function sendAsTransactionalEmail(context, templateId, sendConfigurationId, emails, subject, mergeTags, attachments) {
|
||||
await knex.transaction(async tx => {
|
||||
const template = await getById(context, templateId, false);
|
||||
const template = await getById(context, templateId, false);
|
||||
|
||||
await shares.enforceEntityPermission(context, 'sendConfiguration', sendConfigurationId, 'sendWithoutOverrides');
|
||||
await shares.enforceEntityPermission(context, 'sendConfiguration', sendConfigurationId, 'sendWithoutOverrides');
|
||||
|
||||
await knex.transaction(async tx => {
|
||||
for (const email of emails) {
|
||||
await messageSender.queueAPITransactionalMessage(tx, sendConfigurationId, email, subject, template.html, template.text, template.tag_language, {...mergeTags, EMAIL: email }, attachments);
|
||||
await messageSender.queueAPITransactionalMessageTx(tx, sendConfigurationId, email, subject, template.html, template.text, template.tag_language, {...mergeTags, EMAIL: email }, attachments);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue