# Sandbox SMTP Integration

## Copy SMTP credentials

{% stepper %}
{% step %}
Go to **Email Testing** → **Sandboxes**.

<div align="left" data-with-frame="true"><img src="/files/8ajY90hf8ApmTpNIajjU" alt="Navigation menu showing Email Testing section with Sandboxes option" width="563"></div>
{% endstep %}

{% step %}
Open the sandbox (named **My Sandbox**) created by default.

<div align="left" data-with-frame="true"><img src="/files/elUkO08JnIYrqgndqyxG" alt="Sandboxes list displaying My Sandbox and other project sandboxes" width="563"></div>
{% endstep %}

{% step %}
Under the **Integration** tab, select **SMTP** and copy the credentials such as Host, Port, Username, and Password.

<div align="left" data-with-frame="true"><img src="/files/Xq8JgCHNosL0JDBa1WLK" alt="Integration tab showing SMTP credentials including Host, Port, Username, and Password" width="563"></div>
{% endstep %}

{% step %}
Paste them into your email-sending script, service, or MTA (any service that supports SMTP integration), and run it. The email will arrive in your sandbox in a few seconds.

<div align="left" data-with-frame="true"><img src="/files/KYFGAcXGjH5tylstWiMu" alt="Sandbox inbox displaying received test email message" width="563"></div>
{% endstep %}
{% endstepper %}

## Select your integration

Instead of copy-pasting the SMTP credentials, you can use the code samples already containing your credentials.

{% stepper %}
{% step %}
In the **Integration** tab of your sandbox, scroll down to **Code Samples** and select the programming language or framework you're working with.

<div align="left" data-with-frame="true"><img src="/files/A3dfITyAqLo7AHFJA1JT" alt="Code Samples section showing various programming language options for integration" width="563"></div>
{% endstep %}

{% step %}
Copy the configuration and paste it into your email-sending script. Then, run it. The email will arrive in the sandbox in a few seconds.
{% endstep %}
{% endstepper %}

{% hint style="success" %}
*Learn how exactly Mailtrap can help you streamline email testing processes from our* [*case study with The Software House*](https://mailtrap.io/case-studies/the-software-house/)*.*
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mailtrap.io/email-sandbox/setup/sandbox-smtp-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
