From 41e79788975f1b69337708dd764d01633ede9cee Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Wed, 15 Nov 2023 13:57:24 +0100 Subject: [PATCH] Fixed mailto unsubscribe header to only unsubscribe current tags (#18995) ref GRO-20 The currently set mailto variable would subscribe for all mailgun tags instead of only the tags of the specific email. --- ghost/mailgun-client/lib/MailgunClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/mailgun-client/lib/MailgunClient.js b/ghost/mailgun-client/lib/MailgunClient.js index adc4da58ee..b39fbf50a0 100644 --- a/ghost/mailgun-client/lib/MailgunClient.js +++ b/ghost/mailgun-client/lib/MailgunClient.js @@ -73,7 +73,7 @@ module.exports = class MailgunClient { // Do we have a custom List-Unsubscribe header set? // (we need a variable for this, as this is a per-email setting) if (Object.keys(recipientData)[0] && recipientData[Object.keys(recipientData)[0]].list_unsubscribe) { - messageData['h:List-Unsubscribe'] = '<%recipient.list_unsubscribe%>, <%unsubscribe_email%>'; + messageData['h:List-Unsubscribe'] = '<%recipient.list_unsubscribe%>, <%tag_unsubscribe_email%>'; messageData['h:List-Unsubscribe-Post'] = 'List-Unsubscribe=One-Click'; }