Sendlix Email Templates
Sendlix Email Templates allow you to create professional email designs and dynamically populate them with content.
How it Works
The concept behind Sendlix Templates is unique: you send a simple email to our API, and Sendlix converts it into a fully formatted HTML email based on a template.
The process works as follows:
- Template Creation: You create a template with both an HTML and a plain text version.
- Placeholders & Regex: Within the template, you define placeholders and regular expressions (Regex) to extract data from your sent email.
- Sending: You send an email to the API with a specific subject line.
- Processing: Sendlix recognizes the template, extracts the data from your email, and populates the template.
Template Structure
Each template consists of two main components:
- HTML Version: The design of the email for clients that support HTML.
- Text Version: A plain text alternative for clients that do not display HTML or for accessibility purposes.
Placeholders and Data Extraction
Instead of sending JSON data, you often send the content as unformatted text in the "original email". Sendlix uses Regex patterns to read the dynamic values from this email and insert them into the template.
You define a Regex pattern for each placeholder in the template. When the template is loaded, Sendlix applies these patterns to the content of the sent email to find the values.
Sendlix provides built-in placeholders that you can use without defining a Regex pattern. Currently, the following default placeholder is available:
{{current_year}}: Automatically inserts the current year (e.g., 2026). Useful for copyright notices in the footer.
When a template is applied, only the HTML and plain text body of your original email are replaced by the template content.
All other parts of your original email remain completely untouched. This means:
- Headers (like Reply-To, CC, BCC) are preserved.
- Attachments sent with the original email will be delivered exactly as they are.
Advantages of Templates: Spam Filters and Speed
A key advantage of using Sendlix Templates lies in how our spam filters operate. Because we have strict security policies, legitimate emails can sometimes be falsely filtered during regular email sending.
With templates, the process is optimized for both speed and deliverability:
- Pre-Approval: Every template must undergo a one-time, thorough spam and content check before it is approved for sending.
- Faster Sending: Once a template has passed this check, no deep analyses are performed during the actual sending of the emails. Only basic tests are conducted.
- Higher Deliverability: Since the extensive checks have already taken place beforehand, emails based on templates are blocked significantly less often.
- Increased Performance: Skipping deep analyses during sending results in faster processing and delivery of your emails.
Usage (Trigger)
To use a template, you must signal to the Sendlix API which template should be loaded. This is done via the subject line of the email.
Once your template has passed the pre-approval check and has the status Approved, you can copy the exact subject directly from the template view (under the "Config" tab in the "Template Status" section) in the Sendlix Dashboard.
The subject always has the following format:
!SENDLIX-EMAIL-TEMPLATE(id)!
Example Workflow
To illustrate the process, here is a concrete example of how a simple text email is converted into a formatted HTML template.
1. The Template (stored in Sendlix)
You create a template.
Regex rules for data extraction:
- Placeholder
{{name}}= Regex:Name:\s*(.*) - Placeholder
{{code}}= Regex:Code:\s*(.*)
HTML Template:
<div class="email-container">
<h1>Welcome to us, {{name}}!</h1>
<p>Your personal start code is: <strong>{{code}}</strong></p>
</div>
2. The Sent Email (to the Sendlix API)
You now send a simple text email via our API. The subject triggers the template, the body contains the raw data.
Subject: !SENDLIX-EMAIL-TEMPLATE(id)!
Name: John Doe
Code: START-2026-XYZ
3. The Processing
Sendlix receives the email, recognizes the subject, and applies the Regex rules to the text body:
Name:\s*(.*)finds the value John DoeCode:\s*(.*)finds the value START-2026-XYZ
4. The Final Result (at the recipient)
The extracted values are inserted into the HTML template. The recipient receives the fully formatted email:
<div class="email-container">
<h1>Welcome to us, John Doe!</h1>
<p>Your personal start code is: <strong>START-2026-XYZ</strong></p>
</div>