Mailtrap
Mailtrap’s Email Sending rides a single API token for both transports,
and its webhooks report delivery events back — confirmed deliveries,
bounces, and spam complaints — which powers the honest delivered state,
webhooks like mail.delivered and mail.bounced, and
automatic suppressions. The whole delivery-events
setup is one form on Mailtrap’s side — no SNS-style ceremony.
Prerequisites (in Mailtrap)
Section titled “Prerequisites (in Mailtrap)”- A Mailtrap account with Email Sending enabled (the free plan includes 4,000 emails/month — a natural first entry in a free-first routing chain).
- Your sending domain verified under Domains (Mailtrap’s stepper walks you through the SPF/DKIM records) — see Deliverability for what each record proves.
Attach Mailtrap to Mailway
Section titled “Attach Mailtrap to Mailway”-
Copy the API token.
Mailtrap sidebar → Settings → API Tokens. Use a token scoped to sending so you can rotate it independently.
-
Add the provider.
In the console, open Providers → Add provider and pick Mailtrap (API or SMTP transport — both authenticate with the same token; the SMTP variant connects to
live.smtp.mailtrap.io:587as the literal userapiunder the hood). Paste the token; secrets are encrypted at rest.While you’re there, set the Free tier field (e.g.
4000permonth) — thefree-firstrouting strategy will then spend Mailtrap’s free tier before any paid volume. -
Attach it to a project.
Open the project, attach the provider, and position it in the failover order. Send something — the provider health panel starts filling in.
Delivery events (recommended)
Section titled “Delivery events (recommended)”Without this section Mailtrap only reports “accepted at handoff”. With it, Mailtrap tells Mailway what actually happened afterwards. Two minutes, once.
-
Generate the webhook URL. In the console, open the provider → Configure → Enable delivery tracking → Generate webhook URL, and copy it. The URL contains a per-provider secret — treat it like a password (regenerating revokes the old one instantly).
-
Create the webhook in Mailtrap. Sidebar → Webhooks → Add new webhook:
- Webhook URL: the URL you copied.
- Payload format:
JSON(not JSON Lines). - Select area: Email Sending, then your stream (Transactional) and domain.
- Events: tick Delivery, Soft Bounce, Bounce, Spam Complaint, and Reject. Leave Open, Click, Unsubscribe and Suspension off — Mailway never tracks engagement (your mail stays byte-identical), so those events are ignored.
-
Save — and prove it. Use Mailtrap’s Run Test button next to the webhook: the test event arrives at Mailway within seconds. After a real send, the mail’s pipeline view shows the delivered / bounced node with Mailtrap’s own response details attached.
What each event does in Mailway
Section titled “What each event does in Mailway”| Mailtrap event | Mailway outcome |
|---|---|
| Delivery | The mail turns delivered — the honest, event-confirmed state. |
| Bounce (hard) | The mail turns bounced; the address is auto-suppressed for the project, with Mailtrap’s response / bounce_category shown as the diagnostic. |
| Soft Bounce | Recorded as a transient defer (soft_bounced) — a later Delivery outranks it. |
| Spam Complaint | The mail turns complained; the address is auto-suppressed. |
| Reject | Recorded as dropped — Mailtrap refused the message before sending. |