Mailtrap
Integrate your application with the Mailtrap API
🚀 Quickstart
Connect to Mailtrap with Tenklo and see data flow in 2 minutes.
In Tenklo (free signup), go to Integrations -> Configure New Integration -> 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.
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.
curl "https://api.tenklo.dev/proxy/api/send" \
-H "Authorization: Bearer <NANGO-API-KEY>" \
-H "Provider-Config-Key: <INTEGRATION-ID>" \
-H "Connection-Id: <CONNECTION-ID>" \
-H "Content-Type: application/json" \
-d '{
"from": { "email": "[email protected]" },
"to": [{ "email": "[email protected]" }],
"subject": "Hello from Nango",
"text": "This is a test email sent through Mailtrap."
}'Or fetch credentials with the Node SDK or API.
✅ You're connected! Check the Logs tab in Tenklo to inspect requests.
Follow our Auth implementation guide to integrate Tenklo 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.
For agents
Inbox IDs can also be listed through the Tenklo proxy. These are Tenklo API calls, so they need the user's own Tenklo Environment API key from the Environment Settings tab > API Keys (signing up at app.tenklo.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:
# 1. List accounts to get your account ID
curl "https://api.tenklo.dev/proxy/api/accounts" \
-H "Authorization: Bearer <NANGO-API-KEY>" \
-H "Provider-Config-Key: <INTEGRATION-ID>" \
-H "Connection-Id: <CONNECTION-ID>" \
-H "Base-Url-Override: https://mailtrap.io"
# 2. List that account's inboxes — each has an `id` to use as {inboxId}
curl "https://api.tenklo.dev/proxy/api/accounts/<ACCOUNT-ID>/inboxes" \
-H "Authorization: Bearer <NANGO-API-KEY>" \
-H "Provider-Config-Key: <INTEGRATION-ID>" \
-H "Connection-Id: <CONNECTION-ID>" \
-H "Base-Url-Override: https://mailtrap.io"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.
- How to obtain your Mailtrap credentials Get your API token, and pick the production or sandbox API environment, to connect Mailtrap to Tenklo
Official docs: Mailtrap Transactional Email API
🧩 Pre-built syncs & actions for Mailtrap
Explore Nango-provided actions in your dashboard. Extend and customize them to fit your needs.
No pre-built syncs or actions available yet.