Node.js based forum software built for the modern web
fix: #9800, don't send all welcome test emails to [email protected] @julianlam
Barış Soner Uşaklı71ed50b9c1f0
diff --git a/src/socket.io/admin/email.js b/src/socket.io/admin/email.jsindex c85b44778c..3177291778 100644--- a/src/socket.io/admin/email.js+++ b/src/socket.io/admin/email.js@@ -14,7 +14,6 @@ Email.test = async function (socket, data) {...(data.payload || {}),subject: '[[email:test-email.subject]]',};- let template;switch (data.template) {case 'digest':@@ -34,15 +33,11 @@ Email.test = async function (socket, data) {break;case 'verify-email':- template = 'verify-email';- // falls through-case 'welcome':await userEmail.sendValidationEmail(socket.uid, {force: 1,- email: '[email protected]',- template: template || 'welcome',- subject: !template ? `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]` : undefined,+ template: data.template,+ subject: data.template === 'welcome' ? `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]` : undefined,});break;