feat: update email templates

Add SPM email attachment
This commit is contained in:
David Nguyen
2023-09-26 15:39:34 +10:00
parent a52c19355a
commit e5fa2f4490
12 changed files with 127 additions and 109 deletions

View File

@ -177,9 +177,7 @@ export const createSinglePlayerDocument = async (
},
);
// Todo: Handle `downloadLink`
const template = createElement(DocumentSelfSignedEmailTemplate, {
downloadLink: `${process.env.NEXT_PUBLIC_MARKETING_URL}/single-player-mode/${documentToken}`,
documentName: documentName,
assetBaseUrl: process.env.NEXT_PUBLIC_WEBAPP_URL || 'http://localhost:3000',
});
@ -197,6 +195,7 @@ export const createSinglePlayerDocument = async (
subject: 'Document signed',
html: render(template),
text: render(template, { plainText: true }),
attachments: [{ content: Buffer.from(pdfBytes), filename: documentName }],
});
return documentToken;