Fixed bulk email only having 'bulk-email' tag in certain circumstances

no issue

- the `'bulk-email`' tag was only being added to bulk emails if another more specific tag was set up via config
- we always want the `'bulk-email'` tag to be present for better event filtering
This commit is contained in:
Kevin Ansfield 2020-11-23 18:34:17 +00:00
parent 15650f9dad
commit 4c96aa5c95

View File

@ -84,9 +84,11 @@ function send(message, recipientData, replacements) {
messageData['v:email-id'] = message.id;
}
const tags = ['bulk-email'];
if (bulkEmailConfig && bulkEmailConfig.mailgun && bulkEmailConfig.mailgun.tag) {
messageData['o:tag'] = [bulkEmailConfig.mailgun.tag, 'bulk-email'];
tags.push(bulkEmailConfig.mailgun.tag);
}
messageData['o:tag'] = tags;
if (bulkEmailConfig && bulkEmailConfig.mailgun && bulkEmailConfig.mailgun.testmode) {
messageData['o:testmode'] = true;