Comments
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
ca690c7a7e
commit
6bc25dc154
@ -34,7 +34,7 @@ async function generateKey() { // Needs testing & moving to 'register.utils'
|
||||
async function generateConfirmationEmail(eml, uuid) {
|
||||
try {
|
||||
let htmlTpl = await fs.readFile('mail-templates/register.html', 'utf-8');
|
||||
let minify = await minify(((htmlTpl).replace(/>>ACCESSCODE<</g, uuid)), {
|
||||
let mini = minify(((htmlTpl).replace(/>>ACCESSCODE<</g, uuid)), { // Add collapse whitespace here
|
||||
removeComments: true
|
||||
});
|
||||
let txtTpl = fs.readFile('mail-templates/register.txt', 'utf-8');
|
||||
@ -42,7 +42,7 @@ async function generateConfirmationEmail(eml, uuid) {
|
||||
to: eml,
|
||||
subject: "OwlBoard Registration",
|
||||
text: (await txtTpl).replace(/>>ACCESSCODE<</g, uuid),
|
||||
html: minify
|
||||
html: mini
|
||||
}
|
||||
} catch(err) {
|
||||
log.out(`mailServices.generateConfirmationEmail: Error reading templates, $(err)`, "err");
|
||||
|
Loading…
Reference in New Issue
Block a user