mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
feat(emails): +includeUnverifiedEmails ACP setting
This commit is contained in:
@@ -228,7 +228,7 @@ Emailer.send = async (template, uid, params) => {
|
||||
}
|
||||
|
||||
const allowedTpls = ['verify_email', 'welcome', 'registration_accepted'];
|
||||
if (!userData['email:confirmed'] && !allowedTpls.includes(template)) {
|
||||
if (!meta.config.includeUnverifiedEmails && !userData['email:confirmed'] && !allowedTpls.includes(template)) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
winston.warn(`uid : ${uid} (${userData.email}) has not confirmed email, not sending "${template}" email.`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user