Turn incoming emails into webhooks
Trigger your application or workflow the moment an email arrives — no IMAP polling or parsing.
The Problem
- You need to react when an email arrives but polling is slow and unreliable
- Parsing MIME messages is painful and breaks across different email clients
- Attachments come in inconsistent formats and encodings
- Building email infrastructure distracts from your core product
- Email forwarding rules lose headers and make automation unreliable
Why Existing Solutions Fall Short
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.
How Mailhooks Solves This
Real-time Delivery
Webhooks fire instantly when email arrives. No polling delays.
Structured JSON
Every email is parsed into a clean, consistent JSON payload.
Full Headers
Access all email headers for routing, filtering, and automation.
Reliable Attachments
Attachments are extracted and delivered as downloadable URLs.
How It Works
Create an inbox
Get a unique email address in seconds.
Configure webhook
Point to your endpoint URL.
Receive email
Send or forward an email to your inbox.
Get webhook
Your endpoint receives structured JSON instantly.
Process data
Use the parsed email data in your application.
Code Example
Every email becomes a structured webhook payload you can process.
Webhook Payload
{
"id": "msg_xyz789",
"from": "sender@example.com",
"to": "myapp@inbox.mailhooks.dev",
"subject": "New order #12345",
"text": "Order confirmed. Details attached.",
"html": "<p>Order confirmed. Details attached.</p>",
"headers": {
"message-id": "<unique-id@sender.com>",
"date": "2025-01-15T10:30:00Z"
},
"attachments": [
{
"filename": "invoice.pdf",
"contentType": "application/pdf",
"size": 45678,
"url": "https://files.mailhooks.dev/..."
}
]
}Handler Code
// 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');
});Get Started in 3 Steps
Takes ~2 minutes — no email infrastructure required.
Create a Mailhooks account
Sign up for free in seconds.
Create an inbox
Get a unique email address for your use case.
Add your webhook URL
Point to your endpoint and start receiving emails.
Related use cases
Reply-by-Email for SaaS Applications
Let users respond to notifications directly from their inbox. Receive email replies as webhook payloads in your SaaS app — no email infrastructure required.
Receiving File Attachments via Email
Extract, store, and process email attachments automatically. Get structured metadata and secure download URLs for all file types.