pis #12

Merged
fred.boniface merged 95 commits from pis into main 2023-05-06 21:54:51 +01:00
Showing only changes of commit 6bc25dc154 - Show all commits

View File

@ -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");