1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added option to turn off email verification.

This commit is contained in:
Ylian Saint-Hilaire 2020-11-18 21:11:39 -08:00
parent 09cc0caa3c
commit 43e8bcbe4a
3 changed files with 5 additions and 3 deletions

View file

@ -363,6 +363,7 @@ module.exports.CreateMeshMail = function (parent) {
// Check the email domain DNS MX record.
obj.approvedEmailDomains = {};
obj.checkEmail = function (email, func) {
if (parent.config.smtp.verifyemail === false) { func(true); return; }
var emailSplit = email.split('@');
if (emailSplit.length != 2) { func(false); return; }
if (obj.approvedEmailDomains[emailSplit[1]] === true) { func(true); return; }