0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Fixed mailgun not sending test emails due to empty recipient variables

no issue

Mailgun expects `recipient-variables` to be a json object and fails to attempt sending the message in case its undefined, which is the case for test emails as they don't have member `uuid` or `unsubscribe` url. This sets a default empty object for `recipent-variables` in case of no data.
This commit is contained in:
Rish 2019-11-13 17:01:37 +05:30
parent f5479e1473
commit af43c0872c

View file

@ -49,7 +49,7 @@ module.exports = {
* @param {[object]} recipientData - list of data keyed by email to inject into the email
* @returns {Promise<Array<object>>} An array of promises representing the success of the batch email sending
*/
async send(message, recipients, recipientData) {
async send(message, recipients, recipientData = {}) {
let BATCH_SIZE = 1000;
if (!mailgunInstance) {