Mailtrap SMTP settings: sandbox.smtp.mailtrap.io for testing, live.smtp.mailtrap.io for sending
Mailtrap has two SMTP hosts: sandbox.smtp.mailtrap.io (port 2525/587, catches test mail) and live.smtp.mailtrap.io (port 587/2525, real delivery, username "api" and an API token). Credentials, limits and setup.
Mailtrap outgoing mail server:
sandbox.smtp.mailtrap.io, port <code>2525</code> (STARTTLS) or <code>587</code> (STARTTLS) or <code>465</code> (SSL/TLS) or <code>25</code> (STARTTLS), username = Sandbox: the inbox's generated username — Sending: the string "api", password = Sandbox: the inbox's generated password — Sending: an API token with sending permission.
Mailtrap SMTP settings at a glance
| Outgoing (SMTP) host | sandbox.smtp.mailtrap.io (Email Testing) — live.smtp.mailtrap.io (Email Sending; bulk.smtp.mailtrap.io for bulk stream) |
|---|---|
| Ports & encryption |
2525 — STARTTLS <em>(both hosts)</em>587 — STARTTLS <em>(both hosts)</em>465 — SSL/TLS <em>(both hosts)</em>25 — STARTTLS |
| Username | Sandbox: the inbox's generated username — Sending: the string "api" |
| Password | Sandbox: the inbox's generated password — Sending: an API token with sending permission |
| Authentication | Sandbox credentials are shown per inbox under SMTP Settings; sending credentials under Sending Domains → SMTP/API. |
How to set up Mailtrap SMTP
- Testing: create an inbox → SMTP Settings → copy host sandbox.smtp.mailtrap.io, port 2525, username, password.
- Sending: Sending Domains → add and verify domain → SMTP → host live.smtp.mailtrap.io, port 587, username api, password = token.
Sending limits
- Email Testing free plan: 100 test emails per month, one inbox; Email Sending free: 1,000 emails per month (200/day) after domain verification.
Things that catch people out
- Mail sent to the sandbox never reaches real recipients — that is the point; do not use sandbox credentials in production.
Common Mailtrap SMTP errors
| Server reply | Meaning | Fix |
|---|---|---|
535 5.7.0 Invalid credentials | Sandbox vs sending credentials mixed up. | Match host to credential type. |
More codes: 535 authentication failed, 550 relay denied, 554 rejected as spam, connection timed out — or all SMTP error codes.
When Mailtrap is not enough for your app
When a provider caps you or blocks a port, point the same app at QueenSMTP instead: host smtp.queensmtp.com, port 587 (STARTTLS) or 465 (SSL), your SMTP username and password from the dashboard. $5/year plus $0.10 per 1,000 emails, 100 free a day to test.
Get SMTP credentials — free to test Test Mailtrap nowRelated settings
Mailtrap SMTP — questions
sandbox.smtp.mailtrap.io on port 2525 or 587 with the inbox's generated username and password. For real delivery use live.smtp.mailtrap.io with username api and an API token.
Related Guides
Continue learning with these related articles