This guide will help you test for errors in your emails created using the New Template Language and correct some of the most common mistakes. We will review:
- What to expect when using the "Test Email" tool
- How to identify simple errors in the Drag & Drop Editor
- How to test your email using the API
- How to identify errors when sending via the Transactional platform
- Common mistakes to avoid
Sending a test using the "Test Email" tool
When using any SendinBlue designer to create your email, you will have the option to Send a test directly from the template or campaign review screen.
When using the Drag & Drop Editor, you may also Send a test email directly from the editor.
Contact attributes
If your SendinBlue contact list already contains an email address and attribute value for the contact receiving your test email, then the test email will be correctly personalized with the attribute value. This is true for both Campaign and Transactional template emails.
For example, if my email contains the phrase:
Hi {{ contact.FIRSTNAME }},
and I send my test email to a contact on my list whose EMAIL is "bob@mywebsite.com" and FIRSTNAME attribute is "Bob", then the email will be personalized like this:
Hi Bob,
If the attribute value is empty in my contact list, it will also be blank in the test email like this:
Hi ,
Parameters
When using the Send a test email feature for Transactional emails, the parameter values will be blank in your test email. This is because params are populated at the time of sending when the API call is received.
When using the Send a test email feature for Campaign emails, the parameter values will be populated in your test email only in these cases:
- the campaign was created using the API v3 call AND params were passed during the creation call, or
- the campaign was created in the SendinBlue interface and params were passed as part of the Update Campaign API v3 call before the test email is sent.
Detecting issues within the Drag & Drop Editor
When creating an email in the Drag & Drop Editor, email design blocks containing dynamic content, such as dynamic lists or display conditions are marked with a code symbol in the top-left corner of the block.
When saving your email campaign or template, the icon will turn red if a dynamic content option is enabled but is missing required information.
To correct it, simply complete the empty fields and save again.
Sending a "live" test email
To reliably test an email containing parameters (params), we recommend creating the campaign or template as usual in the Drag & Drop Editor (or your preferred SendinBlue editor), and then sending the campaign or template using the appropriate API call:
Your API call should identify you as the recipient and include actual data for the params included in your campaign or email template.
Good to know: Correctly structured API calls will receive a 200-level response while erroneous API calls will receive an immediate 400-level response.
Detecting errors in Campaigns and templates
Even if your API call is structured correctly, the email will not be sent if the template contains errors.
Campaigns platform - error notifications
If your API call receives a 200-level response but the campaign is suspended due to an error in the template's syntax, a notification about the suspension will appear in your account's notification center.
Transactional platform - error logs
If your API call receives a 200-level response but the email is not received, check your Transactional Logs by navigating to Transactional > Email > Logs.
If your email was not sent due to an error, this will be apparent by the Error event shown in the left column and within the transactional log record for the email.
Common mistakes to avoid
The most common error that should be avoided is mixing the syntax of the old template language in with the New Template Language within a single email template.
For example, this chart shows the difference in syntax for each type of variable. Items from the New Template Language should not be mixed within the same email as those from the Old Template Language.
Variable | New Template Language | Old Template Language |
mirror link |
{{ mirror }} |
[MIRROR] |
unsubscribe link |
{{ unsubscribe }} |
[UNSUBSCRIBE] |
contact attribute ex: COLOR |
{{ contact.ATTRIBUTE }} |
{ATTRIBUTE} |
parameter ex: ADDRESS |
{{ params.PARAMETER }} |
%PARAMETER% |
Other common mistakes include:
- Missing a closing character for your variable or tag, such as the double
}}
or single}
curly brace, respectively - Missing one of the braces in a set of double curly braces around a variable. (e.g.
{{ contact.NAME }
will produce an error, while{{ contact.NAME }}
will work)
If your error was not caused by one of these common mistakes, revisit this guide to using the New Template Language and use it to double-check your template.
You may also contact our customer care team for assistance with your template.
Coming soon
An error handling tool is in development and will be included in the Drag & Drop Editor to help you detect and correct errors without leaving the builder.