Debugging 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
Navigate to Templates in the menu on the left.

Click the template you want to call using the API.

Open the Integration tab.

Toggle the switch to Email Testing.

And click Integrate.

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.

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.
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 docs and go to Sandbox API → Test Emails → Send email (including templates). Under Body, click the dropdown menu, and choose EmailFromTemplate.
Last updated
Was this helpful?

