diff --git a/core/server/services/bulk-email/index.js b/core/server/services/bulk-email/index.js index 91b47f154f..1b3f9f216f 100644 --- a/core/server/services/bulk-email/index.js +++ b/core/server/services/bulk-email/index.js @@ -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