Basic import seems to work
This commit is contained in:
parent
16519c5353
commit
d74806dde3
21 changed files with 555 additions and 749 deletions
10
lib/tools.js
10
lib/tools.js
|
@ -16,7 +16,6 @@ const fsReadFile = bluebird.promisify(require('fs').readFile);
|
|||
const jsdomEnv = bluebird.promisify(require('jsdom').env);
|
||||
|
||||
|
||||
|
||||
const templates = new Map();
|
||||
|
||||
async function getTemplate(template) {
|
||||
|
@ -74,14 +73,7 @@ async function mergeTemplateIntoLayout(template, layout) {
|
|||
return source;
|
||||
}
|
||||
|
||||
|
||||
async function validateEmail(address, checkBlocked) {
|
||||
let user = (address || '').toString().split('@').shift().toLowerCase().replace(/[^a-z0-9]/g, '');
|
||||
|
||||
if (checkBlocked && blockedUsers.indexOf(user) >= 0) {
|
||||
throw new new Error(util.format(_('Blocked email address "%s"'), address));
|
||||
}
|
||||
|
||||
async function validateEmail(address) {
|
||||
const result = await new Promise(resolve => {
|
||||
const result = isemail.validate(address, {
|
||||
checkDNS: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue