Skip to content

Email templates

Email Template

Email template is a tool in your ability to communicate with the user. A single email template consists of three components: the type of email, the subject, and the content.

Email Types

The type of email is limited to the following categories:

  • ForgotPassword
  • ConfirmPassword
  • WelcomeEmail
  • InvitationEmail
  • MfaEmail
  • ConfirmEmail

The subject and content attributes correspond to the email that will be sent to the user. The dimension of freedom is language, meaning you can have multiple variations of the same email type in different languages. You are also able to remove a particular translation of the email template or the entire email template type at once.

Template Language

The template language should be a valid culture, possibly with a specified country, such as "en-GB" for English as spoken in Great Britain. Make sure you have a template in the system with a default language. If the specified language is not found among the email templates, the template in the default language will be used.

Callback URLs

Incorporating a callbackUrl into the email is an essential feature. It is the responsibility of the users of the system to include {{callbackUrl}} in the template.

Warning

The current list of emails is meant to have a callback URL in them that an end user can follow. The URL will be generated by the system and placed into the content of the template via a string replace operation. The system will replace every mention of the {{callbackUrl}} with the necessary link.

Example

Following is the model we expect you to send along with the language and the email template type:

{  
    "subject": "Welcome to Bizzkit",  
    "content": "
    <!DOCTYPE html>  
    <html>  
    <head>  
        <meta charset=\"UTF-8\">  
        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">  
        <title>Registration</title>  
    </head>  
    <body>  
        <p>Welcome to the system. Follow the <a href=\"{{callbackUrl}}">link</a> to finish your registration.</p>  
    </body>  
    </html>
    "  
}  

Given the link our system will generate as https://bizzkit/testUrl, the end email will look like this:

Example

Resulting template that will be sent to the user:

{  
    "subject": "Welcome to Bizzkit",  
    "content": "
    <!DOCTYPE html>  
    <html>  
    <head>  
        <meta charset=\"UTF-8\">  
        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">  
        <title>Registration</title>  
    </head>  
        <body>  
            <p>Welcome to the system. Follow the <a href=\"https://bizzkit/testUrl">link</a> to finish your registration.</p>
        </body>
    </html>
    "
}