Skip to main content

Test your emails customized with Brevo Template Language

In this article, we will explain how to test your emails that were customized with the Brevo Template Language to make sure all content is displaying correctly.

Good to know

How to test an email?

After creating an email template or campaign that contains contact attributes and transactional parameters placeholders, you may want to make sure they are correctly replaced by your contacts and events information.

💡 Good to know
If your email contains contact attributes placeholders, make sure that your Brevo contact list contains an email address and an attribute value for the contact you are using to test your email. If the attribute value is empty in your contact list, the value will either appear as blank like Hi,or like Hi there, if you specified "there" as a fallback text.

To test your personalization, Brevo offers three options:

Send a test email

The Send a test option allows you to:

  • View how the content of your email is displayed in a recipient's inbox,
  • Make sure the contact attributes are correctly replaced with the contact's information,
  • Make sure the transactional parameters are correctly replaced with the event's information.

Limitations

Please note that the Send a test email option may not replace your placeholders depending on:

  • The type of email your are creating (campaign or template),
  • The type of placeholders you inserted in your email (contact attributes or transactional parameters).

 

Email campaign Email template

Contact attributes

If there is an existing email address and attribute value in your Brevo contacts list, the value will be replaced by contact's information.
Transactional parameters

The parameter values will be populated in your test email only in the following cases:
- the campaign was created using the API v3 call AND params were passed during the creation call, or
- the campaign was created in Brevo and params were passed as part of the Update Campaign API v3 call before the test email was sent.

The parameter values in your test email will appear as blank since params are populated at the time of sending when the API call is received or when the Automation workflow is triggered by an event.

 

 

 

Drag & Drop Editor or campaign creation flow Email campaigns list

If you want to test your email on real email clients and if you want to check that your placeholders are working, you can send your campaign to your test list.

To send a test email to your test list: 

  1. Access the Preview & Test window. You can either:
    • Click Preview & Test from the campaign creation flow.
      campaigns_access-preview_EN-US.png
    • Click Send test email from the Drag & Drop Editor. The Preview & Test window opens.
      campaings_send-test-editor_EN-US.png
  2. Go to the Send test email tab.
  3. In the block at the right of your screen, choose from the Recipient drop-down list the test recipients you want to send your test to. You can add as many test recipients as you want and need. To learn more, check our dedicated article Create and use a test list.

    send-test_EN-US.png

    💡 Good to know
    Uncheck the box to remove a recipient from this test and click the bin icon to definitely remove a recipient from the list.
  4. Optional: if you need to add other recipients to this list, click + Add new test recipient.
  5. Click Send test.

Your test email will be sent and you will be able to review it to make sure the placeholders are correctly replaced.

Preview your email as a recipient

The Preview as a recipient option allows you to:

  • Quickly view how the content of your email would be displayed to a specific recipient,
  • Make sure the contact attributes are correctly replaced with the contact's information,
  • Make sure the transactional parameters are correctly replaced with the event's information.

To preview your campaign as a customer: 

  1. Access the Preview & Test window. You can either:
    • Click Preview & Test from the campaign creation flow.
      campaigns_access-preview_EN-US.png
    • Click more-action-icon.png > Preview from the Drag & Drop Editor.  
      campaigns_preview-editor_FR.png
  2. Go to the Preview as customer tab.
  3. In the block at the right of your screen, search for the Recipient field and start typing the name or email address of one of your contacts to have a preview of what this contact will receive.
    campaigns_preview-customer_EN-US.gif
  4. Click Refresh preview.

Your email preview will appear and you will be able to review it to make sure the placeholders are correctly replaced.

Use an API call

To reliably test an email containing transactional parameters placeholders, we recommend creating the email template or campaign as you would normally do, and then sending the email template or campaign using the appropriate API call:

Your API call should then identify you as the recipient and include actual data for the transactional parameters included in your email template or campaign.

💡 Good to know
Correctly structured API calls will receive a 200-level response while erroneous API calls will receive an immediate 400-level response.

⏩ What's next?

🤔 Have a question?

If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.

💬 Was this article helpful?

1 out of 2 found this helpful