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; }