const checkEmail = (email) => { if(email.toLowerCase().indexOf('@shinobi') > -1 && !config.allowSpammingViaEmail){ console.log('CHANGE YOUR ACCOUNT EMAIL!') console.log(email + ' IS NOT ALLOWED TO BE USED') console.log('YOU CANNOT EMAIL TO THIS ADDRESS') return 'cannot@email.com' } return email } // Example of how to generate HTML for an email. // template.createFramework({ // title: 'Password Reset', // subtitle: 'If you did not make this request please change your password.', // body: [ // createRow({ // title: 'Customer', // text: `${customer.email} — ${customer.id}` // }), // createRow({ // btn: { // text: 'Confirm Password Reset', // href: `https://licenses.shinobi.video/forgot/reset?code=${newCode}` // } // }), // createRow({ // title: 'Reset Code', // text: newCode // }), // ].join(''), // }) const template = { createRow : (options) => { const trFillers = `
 
 
` if(options.btn){ return ` ${trFillers}
 
 
${options.btn.text}
 
` } return ` ${trFillers}
 
 
${options.title}
 
${options.text}
 
` }, createFramework : (options) => { return `
 
${options.title}
 
 
 
${options.subtitle}
 
 
 
 
${options.body}
 
 
 
 
 
 
 
 
${options.footerText ? `
 
${options.footerText}
 
 
` : ''}
` } } module.exports = { template: template, checkEmail: checkEmail, }