Templates
The SaaSify Kit uses React Email to create email templates. You can run the Email Studio so that you can preview your email templates using following command.
npm run email
All your email templates are located in the src/Email
folder.
Email components
The src/Email/EmailComponents.tsx
file contains all the components that you can use to create your email templates. Few of them are:
NavBar
CTA
Desclaimer
Generic Transactional Email
The src/Email/GenericTransactional.tsx
file contains the generic transactional email template. You can use this template to create your own transactional email templates. For example, you can create a WelcomeEmail.tsx
file in the src/Email
folder and use the GenericTransactional
template to create your welcome email template.
New Email Template
To create a new email template, you can create a new file in the src/Email
folder. For example, you can create a ForgetPasswordEmail.tsx
file in the src/Email
folder and either use the GenericTransactional
template or create your own template by using the React Email components.
Send Email
To send an email, you can use the sendReactMail
function in the src/Email/Send.tsx
file. For example, you can check the sendWelcomeEmail
function to see how to send a welcome email to a user using the WelcomeEmail
template.