Skip to content

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.

  • 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.
  1. Copy the API token.

    Mailtrap sidebar → Settings → API Tokens. Use a token scoped to sending so you can rotate it independently.

  2. 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:587 as the literal user api under the hood). Paste the token; secrets are encrypted at rest.

    While you’re there, set the Free tier field (e.g. 4000 per month) — the free-first routing strategy will then spend Mailtrap’s free tier before any paid volume.

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

Without this section Mailtrap only reports “accepted at handoff”. With it, Mailtrap tells Mailway what actually happened afterwards. Two minutes, once.

  1. Generate the webhook URL. In the console, open the provider → ConfigureEnable delivery trackingGenerate webhook URL, and copy it. The URL contains a per-provider secret — treat it like a password (regenerating revokes the old one instantly).

  2. Create the webhook in Mailtrap. Sidebar → WebhooksAdd 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.
  3. 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.

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.