Adjust mail templates for registration code
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
@@ -47,13 +47,13 @@ export function generateCode(): string {
|
||||
async function generateConfirmationEmail(eml: string, uuid: string) {
|
||||
try {
|
||||
const htmlTpl = await fs.readFile("mail-templates/register.html", "utf-8");
|
||||
const htmlStr = htmlTpl.replace(/>>ACCESSCODE<</g, uuid);
|
||||
const htmlStr = htmlTpl.replace(/987654/g, uuid);
|
||||
const htmlMin = await minifyMail(htmlStr);
|
||||
const txtTpl = fs.readFile("mail-templates/register.txt", "utf-8");
|
||||
return {
|
||||
to: eml,
|
||||
subject: "OwlBoard Registration",
|
||||
text: (await txtTpl).replace(/>>ACCESSCODE<</g, uuid),
|
||||
text: (await txtTpl).replace(/987654/g, uuid),
|
||||
html: htmlMin,
|
||||
};
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user