mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
fix: #9800, don't send all welcome test emails to test@example.org @julianlam
This commit is contained in:
@@ -14,7 +14,6 @@ Email.test = async function (socket, data) {
|
|||||||
...(data.payload || {}),
|
...(data.payload || {}),
|
||||||
subject: '[[email:test-email.subject]]',
|
subject: '[[email:test-email.subject]]',
|
||||||
};
|
};
|
||||||
let template;
|
|
||||||
|
|
||||||
switch (data.template) {
|
switch (data.template) {
|
||||||
case 'digest':
|
case 'digest':
|
||||||
@@ -34,15 +33,11 @@ Email.test = async function (socket, data) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'verify-email':
|
case 'verify-email':
|
||||||
template = 'verify-email';
|
|
||||||
// falls through
|
|
||||||
|
|
||||||
case 'welcome':
|
case 'welcome':
|
||||||
await userEmail.sendValidationEmail(socket.uid, {
|
await userEmail.sendValidationEmail(socket.uid, {
|
||||||
force: 1,
|
force: 1,
|
||||||
email: 'test@example.org',
|
template: data.template,
|
||||||
template: template || 'welcome',
|
subject: data.template === 'welcome' ? `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]` : undefined,
|
||||||
subject: !template ? `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]` : undefined,
|
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user