mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
closes #6790
This commit is contained in:
@@ -210,6 +210,12 @@ Emailer.sendToEmail = function (template, email, language, params, callback) {
|
|||||||
|
|
||||||
var lang = language || meta.config.defaultLang || 'en-GB';
|
var lang = language || meta.config.defaultLang || 'en-GB';
|
||||||
|
|
||||||
|
// Add some default email headers based on local configuration
|
||||||
|
params.headers = Object.assign({
|
||||||
|
'List-Id': '<' + [template, params.uid, getHostname()].join('.') + '>',
|
||||||
|
'List-Unsubscribe': '<' + [nconf.get('url'), 'uid', params.uid, 'settings'].join('/') + '>',
|
||||||
|
}, params.headers);
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function (next) {
|
function (next) {
|
||||||
Plugins.fireHook('filter:email.params', {
|
Plugins.fireHook('filter:email.params', {
|
||||||
@@ -249,6 +255,7 @@ Emailer.sendToEmail = function (template, email, language, params, callback) {
|
|||||||
uid: params.uid,
|
uid: params.uid,
|
||||||
pid: params.pid,
|
pid: params.pid,
|
||||||
fromUid: params.fromUid,
|
fromUid: params.fromUid,
|
||||||
|
headers: params.headers,
|
||||||
};
|
};
|
||||||
Plugins.fireHook('filter:email.modify', data, next);
|
Plugins.fireHook('filter:email.modify', data, next);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user