Emails and OTP > Email Templates
Emails and OTP > Email TemplatesKroxt BaaS SDK v1.0.5

Email Templates

Build and save email templates visually. Kroxt features a Handlebars layout engine to parse bracket attributes dynamically.

Handlebars Parsers

Design layouts in HTML, and bind variables like `{{name}}`. When triggered, the variables dictionary passed via the SDK is compiled and delivered seamlessly.

Trigger Templated Email with variables:
template.ts
1
2
3
4
5
6
7
8
9
// Trigger a template named 'welcome-onboarding' defined in your dashboard
await baas.communication.sendEmail({
  to: "newuser@gmail.com",
  template: "welcome-onboarding",
  variables: {
    name: "Alex Doe",
    couponCode: "WELCOME50",
  },
});