# Setup & Configuration

Get started with Email Sandbox quickly and easily. This section covers everything you need to integrate Email Sandbox into your development workflow.

## Integration Options

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Application Integration</strong></td><td><em>Step-by-step guide to integrate Email Sandbox with your application. Learn how to configure SMTP settings, use API endpoints, and route test emails to your sandbox.</em></td><td><a href="/pages/h2IE7G1GFsqt6pTfK43o">/pages/h2IE7G1GFsqt6pTfK43o</a></td></tr><tr><td><strong>Sandbox API</strong></td><td><em>Programmatically manage your sandboxes and emails using our comprehensive API. Automate testing workflows and integrate with your CI/CD pipeline.</em></td><td><a href="/pages/CpYP104FlMgMNIUylbTd">/pages/CpYP104FlMgMNIUylbTd</a></td></tr><tr><td><strong>API Tokens</strong></td><td><em>Learn how to create, manage, and use API tokens for Email Sandbox.</em></td><td><a href="/pages/rfRBm6aaywcXfBMDCrLw">/pages/rfRBm6aaywcXfBMDCrLw</a></td></tr><tr><td><strong>Email Address per Sandbox</strong></td><td><em>Each sandbox gets a unique email address. Learn how to use sandbox-specific addresses for organizing and isolating test scenarios.</em></td><td><a href="/pages/skMhhgrCQUZNtqq6xXSE">/pages/skMhhgrCQUZNtqq6xXSE</a></td></tr></tbody></table>

## Quick Start

#### 1. Create Your First Sandbox

* Log in to your Mailtrap account
* Navigate to Email Sandbox
* Click "Create New Sandbox"
* Name your sandbox (e.g., "Development", "Staging", "QA")

#### 2. Get Your Credentials

* SMTP Host: `sandbox.smtp.mailtrap.io`
* SMTP Port: `2525` (or `25`, `465`, `587`)
* Username: Your sandbox username
* Password: Your sandbox password

#### 3. Configure Your Application

```javascript
// Example Node.js configuration
const nodemailer = require('nodemailer');

const transporter = nodemailer.createTransport({
  host: 'sandbox.smtp.mailtrap.io',
  port: 2525,
  auth: {
    user: 'your_username',
    pass: 'your_password'
  }
});
```

#### 4. Send Test Email

```javascript
await transporter.sendMail({
  from: 'test@example.com',
  to: 'user@example.com',
  subject: 'Test Email',
  text: 'This is a test email'
});
```

## Integration Methods

#### SMTP Integration

* Universal compatibility with any SMTP client
* No code changes required
* Perfect for legacy applications
* Supports all major frameworks and languages

#### API Integration

* Full programmatic control
* Retrieve and analyze emails via API
* Automate testing workflows
* Perfect for CI/CD pipelines


---

# 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.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.
