Skip to Content

Email Templates

Bsh Engine allows you to create email templates to send emails to your users, this allow yout to set a templates that you can use to send emails without need to write the email content every time.

Email Templates

When you start the engine, it will create default email templates for authentication operations (activation, reset password, etc.).
You can edit them to customize the content of the emails.

Create an Email Template

Create Email Template

PropertyDescriptionRequireddefault
NameThe name of the email templateYes~
SubjectThe subject of the email templateYes~
BodyThe body of the email templateYes~
HTMLWhether the email template is HTMLNofalse

Template Variables

Bsh Engine allows you to use variables in your email templates to personalize the email content, the syntax is {{variableName}}.

for the authentication operations templates, you can access the user information like this:

Hello {{profile.firstName}} {{profile.lastName}}, Welcome to our application. Your login URL is: https://app.example.com/login If you have any questions, please contact us at support@example.com.

When using a templates with variables to send emails, you must pass the data object with the variables values.
Read more about the Send Email endpoint.