Need help with our last invoice
Hi team!
We were charged twice on invoice #4821 last week. Could you take a look and refund the duplicate? Screenshot attached.
Best regards,
Sarah
Create inboxes on demand, receive emails via API or webhooks, and process attachments securely. Built for support pipelines, document processing, automations, and AI workflows.
Skip the custom MIME parsing, header extraction, and attachment handling. Mailtrap converts every incoming message into a predictable JSON payload your backend can consume immediately – sender, recipients, subject, headers, plain text, HTML body, and attachment download URLs, all in one structured object.
Hi team!
We were charged twice on invoice #4821 last week. Could you take a look and refund the duplicate? Screenshot attached.
Best regards,
Sarah
{"id": "1700000000000123","inbox_id": 12345,"from": "sarah@acme.co","to": ["support-bot-1a2b3c4d@inbound-mailtrap.io"],"cc": ["trev@acme.co","sophie@acme.co","brian@acme.co"],"bcc": [],"reply_to": null,"subject": "Need help with our last invoice","rfc_message_id": "<abc@acme.co>","in_reply_to": null,"references": [],"headers": {"mime-version": "1.0","return-path": "<sarah@acme.co>"},"size": 258048,"html_size": 198,"text_size": 150,"received_at": "2026-05-27T10:42:11.000Z","thread_id": "1700000000000124","attachments": [{"attachment_id": "att-1","size": 188416,"filename": "invoice-4873.png","content_type": "image/png","content_disposition": "attachment","content_id": null,"download_url": "https://s3.amazonaws.com/inbound-mail/att-1?X-Amz-Signature=...","download_url_expires_at": "2026-05-27T11:42:11.000Z"}],"raw_message_url": "https://s3.amazonaws.com/inbound-mail/raw.eml?X-Amz-Signature=...","raw_message_expires_at": "2026-05-27T11:42:11.000Z","html_body": "<html><body><p>Hi team!</p><p>We were charged twice on invoice #4873 last week. Could you take a look and refund the duplicate? Screenshot attached.</p><p>Best regards,</p><p>Sarah</p></body></html>","text_body": "Hi team!\n\nWe were charged twice on invoice #4873 last week. Could you take a look and refund the duplicate? Screenshot attached.\n\nBest regards,\n\nSarah"}
Create inboxes, receive emails in real time, download attachments securely, and manage every message through a clean, predictable API.
curl -X POST https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes \
-H 'Authorization: Bearer YOUR_API_KEY'
Get notified immediately via signed JSON webhook. Fetch the full parsed message – sender, recipients, headers, body, attachment URLs – from the Messages API. No MIME parsing required.
During development, send your workflow’s replies to Email Sandbox instead of real recipients and check content and recipients before going live.
Create Mailtrap-hosted inboxes instantly. Start receiving emails right away.
Retrieve complete conversations – not just individual emails. Preserve context for replies, support tickets, and AI workflows.
Auto-forward incoming email to other addresses based on sender, recipient, or any header, such as Subject.
Send replies through the API while preserving Message-ID, threading, and conversation history.
Download attachments through secure signed URLs and stream them directly into S3, databases, CRMs, or processing pipelines.
Organize inboxes by customer, environment, or workflow. Manage inboxes, folders, and messages entirely through the API.
Whether you're building features, integrating systems, or managing infrastructure, Mailtrap gives you a reliable way to receive and process inbound email.
Integrate email API into your stack: native support for modern dev tools and AI coding assistants.
No. You can create a Mailtrap-hosted inbox and start receiving email immediately. Every inbox gets a unique address (for example, app-3f2a@inbound-mailtrap.io) that works out of the box. If you need to receive email on your own domain, you can connect it later.
It depends on your use case. Webhooks are best for real-time processing and event-driven workflows. The Messages API is ideal when your application prefers polling or needs to retrieve messages on demand. You can use both together if needed.
Attachments come back as signed download URLs in the Messages API response. The webhook itself contains only message identifiers – fetch the message via the API to get the download URLs. This keeps payloads small and lets you download files only when needed.
Every webhook payload is signed using HMAC-SHA256. Verify the signature using the Mailtrap-Signature header to ensure requests originated from Mailtrap. Failed deliveries are retried every 5 minutes, up to 40 attempts, then the webhook is paused and you are notified by email.
Yes. Create a dev inbox separate from production and send test emails to it to verify your receiving logic. To test the replies your application sends back, send them to Email Sandbox during dev instead of real recipients, and check content and recipients before going live.
Yes. You can send replies through the API while preserving the conversation thread. Mailtrap automatically manages the threading headers (In-Reply-To, References) and sender address. On Mailtrap-hosted inboxes, replies are capped at 20 in total – connect a custom domain to remove the limit.
Yes. Inboxes are fully programmable. Create, organize, and manage them through the API, making it easy to provision dedicated addresses for customers, projects, environments, or internal workflows.
Provision as many inboxes as you need. Create separate inboxes for customers, environments, applications, or workflows and manage them entirely through the API.