Added config to send bulk email in testmode

- mailgun has a testmode flag we can use to get email to be accepted but not delivered
- this is useful for developers testing general bulk email code - not for users - so it is only available via config
This commit is contained in:
Hannah Wolfe 2020-07-24 11:55:34 +01:00
parent 5144a0e09c
commit 3491e60c9d

View File

@ -104,6 +104,12 @@ module.exports = {
});
}
if (bulkEmailConfig && bulkEmailConfig.mailgun && bulkEmailConfig.mailgun.testmode) {
Object.assign(batchData, {
'o:testmode': true
});
}
const messageData = Object.assign({}, message, batchData);
// Rename plaintext field to text for Mailgun