diff --git a/lib/private/mailgun/send-html-email.js b/lib/private/mailgun/send-html-email.js
index 47ff2c9..e3228eb 100644
--- a/lib/private/mailgun/send-html-email.js
+++ b/lib/private/mailgun/send-html-email.js
@@ -44,6 +44,13 @@ module.exports = {
example: 'Sails Co.'
},
+ bcc: {
+ description:
+ 'A list of email addresses of recipients secretly copied on the email.',
+ example: ['jahnna.n.malcolm@example.com'],
+ defaultsTo: [],
+ },
+
secret: {
type: 'string',
required: true,
@@ -117,9 +124,20 @@ module.exports = {
},
-
- fn: async function({to, subject, htmlMessage, from, fromName, secret, domain, host, toName, textMessage, testMode}) {
-
+ fn: async function ({
+ to,
+ subject,
+ htmlMessage,
+ from,
+ fromName,
+ bcc,
+ secret,
+ domain,
+ host,
+ toName,
+ textMessage,
+ testMode,
+ }) {
// Import dependencies.
var Http = require('machinepack-http');
@@ -151,6 +169,10 @@ module.exports = {
html: htmlMessage || '',
};
+ if (Array.isArray(bcc) && bcc.length) {
+ data.bcc = bcc.join(',');
+ }
+
if(testMode) {
data['o:testmode'] = 'yes';
}