Skip to main content

🚀 Quickstart

Connect to Mailtrap with Nango and see data flow in 2 minutes.
1

Create the integration

In Nango (free signup), go to Integrations -> Configure New Integration -> Mailtrap.
2

Authorize Mailtrap

Go to Connections -> Add Test Connection -> Authorize, then enter your API token. Leave the API Environment on send, or switch it to sandbox to test without sending to real recipients. Later, you’ll let your users do the same directly from your app.
3

Call the Mailtrap API

Let’s send your first email through the Mailtrap API. Replace the placeholders below with your Environment API key, integration ID, and connection ID:
Connected to the sandbox? Include your sandbox inbox ID in the request path, e.g. /api/send/{inboxId} instead of /api/send. See Sandbox inbox IDs.
Or fetch credentials with the Node SDK or API.✅ You’re connected! Check the Logs tab in Nango to inspect requests.
4

Implement Nango in your app

Follow our Auth implementation guide to integrate Nango in your app.To obtain your own production API token, follow the connect guide linked below.

Sandbox inbox IDs

Sandbox connections deliver to a Mailtrap inbox instead of real recipients, so the inbox ID belongs in the request path: /api/send/{inboxId}. To find it, open the Sandboxes section of your Mailtrap account and copy the numeric ID from the inbox URL — for https://mailtrap.io/sandboxes/2564102/settings the inbox ID is 2564102.
Inbox IDs can also be listed through the Nango proxy. These are Nango API calls, so they need the user’s own Nango Environment API key from the Environment Settings tab > API Keys (signing up at app.nango.dev/signup first if needed), sent as Authorization: Bearer <NANGO-API-KEY>. Ask for a key scoped to environment:proxy rather than the full-access key created on signup, and don’t store or log it. See API keys.Mailtrap’s inbox API lives on mailtrap.io, not on the sending hosts this integration connects to, so pass a Base-Url-Override header to reach it:
Base-Url-Override is enabled by default and can be restricted or disabled per deployment via NANGO_PROXY_BASE_URL_OVERRIDE_ENABLED / NANGO_PROXY_BASE_URL_OVERRIDE_DENYLIST.

📚 Mailtrap Integration Guides

Nango-maintained guides for common use cases. Official docs: Mailtrap Transactional Email API

🧩 Pre-built syncs & actions for Mailtrap

Enable them in your dashboard. Extend and customize to fit your needs. No pre-built syncs or actions available yet.
Not seeing the integration you need? Build your own independently.