Skip to content

Email Templates

Access Prerequisites

  • Permission (module): access granted by the route administrative guard (admin). There is no specific dynamic module for this screen.
  • License/Feature: None.
  • Menu container: GENERAL → Communication group (icon campaign) → Email Templates.

What it is / when to use

Catalog of the platform's transactional templates — the specific content of each system email (welcome, password recovery, confirmations, codes, etc.). Each template has a version in Portuguese and English, and may also carry an equivalent SMS text. Use it to edit the text/HTML the system fires automatically for each event, without touching the code.

Prerequisites

  • Permission: item under the route admin guard. Permission in Axia is dual (CPM enum + dynamic module in DB); here the gate is the route guard.
  • License/Feature: none.
  • Dependencies on other screens: the frame (header/footer/brand) surrounding this content comes from the Master Template.

Step by step

  1. Access the Communication → Email Templates menu.
  2. The screen lists the existing templates; use the search to filter by id or subject (pt/en).
  3. Click View to open the preview directly, or Edit to open the editor.
  4. In the editor, adjust the subject/HTML/SMS per language using the tabs.
  5. Preview and Save.

Fields

Listing

ColumnWhat it showsData source
Id (id)Template identifier (the key the system uses to fire it)email_template.id
Subject (subject)Subject in Portuguesesubject
Has English (hasEnglish)Whether there is a filled English versionderived from subject_en/htmlData_en
Has SMS (hasSms)Whether there is an associated SMS textderived from sms/sms_en
ActionsView / Edit

Editor (modal)

FieldWhat it isRequired?System/backend effect
Subject (subject / subject_en)Email subject per languageYes (at least pt)Saved in the template; used as subject in the automatic dispatch.
HTML (htmlData / htmlData_en)Email HTML body per languageYesContent rendered inside the Master Template frame.
Plain text body (body)Plain text version (fallback)NoText alternative when applicable.
SMS (sms / sms_en)Short text for the SMS channel of the same eventNoAllows the same event to also trigger an SMS.
From / To (from / to)Sender/recipient metadata of the templateNoAuxiliary template fields.

Editor placeholders

The preview replaces markers with real data (logged-in user):

PlaceholderReplaced by
@name@User's name
@email@User's email
@date@Current date (pt-BR)
@link@Platform base origin/URL
@code@6-digit numeric code (example, for verification emails)

Actions and modals

  • View: opens the editor in read-only mode with the preview opened directly (openPreviewDirectly). If the template has no content, it warns that there is nothing to display.
  • Edit: opens the editor with tabs; upon Save, sends the template to the backend (updateEmailTemplate). On success, closes and reloads the list; on error, keeps it open with a warning.
  • Preview (pt / en): builds the HTML for the chosen language with placeholders resolved and renders it in an iframe. Warns if the chosen language is empty.
  • Search: filters the table by id, subject, or subject_en.

Business rules / cautions

Attention

  • The template id is the dispatch key used by the system. Do not invent or rename ids: change content, not the key, or the event will stop finding the template.
  • Keep pt and en consistent; an empty language degrades the experience for users in that locale.
  • Email HTML is restrictive (tables + inline styles). Validate in the preview before saving.
  • Placeholders in the preview use the logged-in operator's data (for viewing only); in the actual send, they are filled with the recipient's/event's data.
  • Cross-provider rendering: content sent via SimpleEmailService (bodyData + htmlData). Broken HTML may become plain text in Mailgun/Brevo/SendGrid; SES masks the issue.