Email Templates
Email templates can be used to automatically send emails to your customers when a specific event is triggered. Following are the supported events:
  • license.created
  • license.renewed
  • license.extended
  • license.expiring-soon (triggered three days before the license expiry date)
  • license.expired
  • license.deleted
  • user.created
  • user.reset-password-request
NOTE: Use webhooks instead of email templates if you have a complex workflow.

Creating an email template

You can easily create an email template through the dashboard. Go to the email templates section in the dashboard and click the add button. An email template form with the following fields will popup:
After creating the email template, make sure you link it with the product.

Name

Name of the email template.

From Name

The from name that should appear for the email.

From Email

The email address to be used for sending the email.
The from email address will only be used if you have verified your domain, otherwise, it will default to [email protected].

Subject

The subject of the email. This can contain data placeholders too.

ReplyTo

Reply to address for the email. We recommend setting this to your support email.

Body

The body of the email. You can use HTML for formatting.

Event

The event to trigger the email.

Enabled

Whether email should be sent or not, you can use it to disable the email template.

Custom

By default, your email body will be automatically wrapped in a responsive HTML email. In case you want to prevent that and use your own branded email, this property can be set to true.

Data placeholders

All the properties of user, license and product resources can be accessed in the body and the subject of the email template. The general syntax is resource.propertName. Following is a sample email template body:
1
<p>Dear {{user.firstName}},</p>
2
3
<p>Thank you for ordering {{product.displayName}}.</p>
4
5
<p>Your license key for the {{product.displayName}} is:</p>
6
7
<p><b>{{license.key}}</b></p>
8
9
<p>You can use this license key to activate {{product.displayName}} on
10
<b>{{license.allowedActivations}}</b> device(s).
11
12
<p>For any queries or issues you can contact us at
13
<a href="mailto:[email protected]">[email protected]</a> and we will
14
assist you promptly.</p>
15
16
<p>Best Regards,<br>
17
The MyCompany HelpDesk</p>
Copied!

Data filters

Data filters can be used to format the date and number fields in the email templates.

format_date

Formats date and times.
Input
1
{{ license.expiresAt | format_date: "G" }}
Copied!
Output
1
6/15/2021 1:45:30 PM
Copied!

format_number

Formats numbers.
Input
1
{{ license.allowedActivations | format_number: "N" }}
Copied!
Output
1
10.00
Copied!
For other supported filters please refer to the following:

Sending test emails

After you have created the email template, click the email template in the email templates table. On the email template page, you will find a Send Test Email button on the right top. You can use this to test your email template by providing the sample data.

Verifying email domain

In order for Cryptlex to send emails on your behalf using your From Email address, you must verify that you own the domain. This is done by adding a Sending Domain in Cryptlex and verifying the DNS records shown in the Sending Domain.
If you don’t add the domain verification records, Cryptlex sends emails using [email protected] email address. If you want to give your customers a white-label experience, hiding all Cryptlex branding, you must add and verify the sending domain.

To verify that a domain belongs to you

  1. 1.
    On the email templates page in the dashboard, click on the Sending Domains button.
  2. 2.
    On the Sending Domains page click on the Add button to add your domain.
  3. 3.
    Verify the domain by adding the required TXT and CNAME DNS entries.
  4. 4.
    After you have added the CNAME and TXT records, click the Verify button to confirm that all of your records are now valid.
After your domain is verified, leave the CNAME and TXT records in place.