feat: make email template reusable for signed, invite and completed

This commit is contained in:
Ephraim Atta-Duncan
2023-06-21 13:20:07 +00:00
parent 590344f793
commit 02569619f9
10 changed files with 1662 additions and 59 deletions

View File

@ -31,11 +31,25 @@ export const sendMail = async ({ email }: { email: string }) => {
);
}
const html = emailHtml({
email: 'lucas@documenso.com',
name: 'Lucas Smith',
documentName: 'NDA.pdf',
firstName: 'Lucas',
type: 'signed',
});
await transporter.sendMail({
from: 'Documenso <hi@documenso.com>',
to: email,
subject: 'Welcome to Documenso!',
text: emailText,
html: emailHtml,
text: emailText({
email: 'lucas@documenso.com',
name: 'Lucas Smith',
documentName: 'NDA.pdf',
firstName: 'Lucas',
type: 'completed',
}),
html,
});
};