bugDebugging with Sandbox

Overview

Before sending your email templates to production, it's important to test them in a safe environment. Mailtrap Email Sandbox allows you to test your templates, preview how they render, and verify that all variables are working correctly.

Debugging steps

spinner
1

Navigate to Templates in the menu on the left.

2

Click the template you want to call using the API.

3

Open the Integration tab.

4

Toggle the switch to Email Testing.

5

And click Integrate.

6

Select the desired sandbox from the dropdown menu to reveal its credentials. Copy the Host, API Token, Template UUID, and Sandbox ID.

Alternatively, you can also use one of the pre-made Code Samples.

7

Paste the code into your project and customize it if needed. Then, run the code to send an email to the selected Email Testing sandbox.

8

Finally, check the sandbox you specified in the script.

The Tech Info tab contains the link to the template you tested and lists all the variables used in the template.

For more details, open the API docsarrow-up-right and go to Sandbox APIarrow-up-right → Test Emails → Send email (including templates). Under Body, click the dropdown menu, and choose EmailFromTemplate.

Last updated

Was this helpful?