From be97aa6f130a013342e39e9e0d289f783f30bac6 Mon Sep 17 00:00:00 2001
From: Julian Lam 0
for midnight, 17
for 5:00pm). Keep in mind that this is the hour according to the server itself, and may not exactly match your system clock.
The approximate server time is:
The next daily digest is scheduled to be sent ",
- "notifications.settings": "Email notification settings",
- "notifications.remove-images": "Remove images from email notifications"
+ "notifications.remove-images": "Remove images from email notifications",
+ "include-unverified-emails": "Send emails to recipients who have not explicitly confirmed their emails",
+ "include-unverified-warning": "By default, users with emails associated with their account have already been verified, but there are situations where this is not the case (e.g. SSO logins, grandfathered users, etc). Enable this setting at your own risk – sending emails to unverified addresses may be a violation of regional anti-spam laws."
}
\ No newline at end of file
diff --git a/src/emailer.js b/src/emailer.js
index c8cfd7cbe8..51f2143879 100644
--- a/src/emailer.js
+++ b/src/emailer.js
@@ -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.`);
}
diff --git a/src/views/admin/settings/email.tpl b/src/views/admin/settings/email.tpl
index 6b856526ef..1a8e98177e 100644
--- a/src/views/admin/settings/email.tpl
+++ b/src/views/admin/settings/email.tpl
@@ -11,6 +11,7 @@
@@ -18,6 +19,43 @@
[[admin/settings/email:include-unverified-warning]]
+ + + + +