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.
This commit is contained in:
Simon Backx 2023-11-15 13:57:24 +01:00 committed by GitHub
parent 566f2055d0
commit 41e7978897
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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';
}