IMAP polling introduces latency and requires managing persistent connections
Regex parsing of email bodies is fragile and constantly breaks
Email forwarding loses important metadata like headers and attachments
Running your own mail server means dealing with spam, security, and deliverability
You shouldn't have to build this yourself.
Webhooks fire instantly when email arrives. No polling delays.
Every email is parsed into a clean, consistent JSON payload.
Access all email headers for routing, filtering, and automation.
Attachments are extracted and delivered as downloadable URLs.
Get a unique email address in seconds.
Point to your endpoint URL.
Send or forward an email to your inbox.
Your endpoint receives structured JSON instantly.
Use the parsed email data in your application.
Every email becomes a structured webhook payload you can process.
{
"id": "msg_xyz789",
"from": "[email protected]",
"to": "[email protected]",
"subject": "New order #12345",
"text": "Order confirmed. Details attached.",
"html": "Order confirmed. Details attached.
",
"headers": {
"message-id": "",
"date": "2025-01-15T10:30:00Z"
},
"attachments": [
{
"filename": "invoice.pdf",
"contentType": "application/pdf",
"size": 45678,
"url": "https://files.mailhooks.dev/..."
}
]
} // Handle any incoming email as a webhook
app.post('/webhooks/inbound-email', (req, res) => {
const { from, subject, text, attachments } = req.body;
console.log(`Email from ${from}: ${subject}`);
// Process attachments
for (const attachment of attachments) {
console.log(`Attachment: ${attachment.filename}`);
// Download and process: attachment.url
}
// Route based on sender, subject, or content
if (subject.includes('order')) {
processOrder(req.body);
}
res.status(200).send('OK');
});Every inbox can be configured with sender filtering rules. You can whitelist specific domains or email addresses, or use our webhook to implement your own spam filtering logic. Emails that don't match your rules are automatically rejected.
Webhooks are typically delivered within 100-500ms of email receipt. We process emails in real-time with no polling delays. For high-availability applications, we also offer webhook retries with exponential backoff.
Mailhooks is built specifically for inbound email. We offer simpler setup (no DNS changes required for testing), better attachment handling with direct download URLs, and a developer-first API for fetching emails programmatically—perfect for E2E testing.
Yes! You can connect your own domain with simple DNS configuration. We also provide free subdomains on inbox.mailhooks.dev for testing and development.
We automatically retry failed webhooks with exponential backoff for up to 24 hours. You can also use our API to fetch any missed emails. All emails are stored and accessible via the dashboard.
Takes ~2 minutes — no email infrastructure required.
Sign up for free in seconds.
Get a unique email address for your use case.
Point to your endpoint and start receiving emails.