Merge pull request #164 from heroic/listUnsubscribe

Add List-Unsubscribe header
This commit is contained in:
Andris Reinman 2017-03-08 19:30:16 +02:00 committed by GitHub
commit 745bfb06e3

View file

@ -414,6 +414,10 @@ function formatMessage(message, callback) {
'List-ID': {
prepared: true,
value: libmime.encodeWords(list.name) + ' <' + list.cid + '.' + (url.parse(configItems.serviceUrl).hostname || 'localhost') + '>'
},
'List-Unsubscribe': {
prepared: true,
value: url.resolve(configItems.serviceUrl, '/subscription/' + list.cid + '/unsubscribe/' + message.subscription.cid + '?auto=yes')
}
},
list: {