Webhooks 🔔
Imagine you send an email and you want to know the moment it’s delivered. Or the moment someone clicks a link. Or if it bounced. That’s what webhooks are for. Instead of constantly checking (“did it deliver? did it deliver?”), Mailofly pings your server the instant something happens. Like a walkie-talkie call at exactly the right moment.How it works
- You register a URL (your server’s address) in the Mailofly dashboard
- When an email event happens, Mailofly sends a
POSTrequest to your URL with all the details - Your server reads the info, does whatever it needs to do, and responds with
200 OK
Setting up a webhook
- Go to Settings → Webhooks in your dashboard
- Click Add Webhook
- Enter your HTTPS endpoint URL (e.g.
https://yourapp.com/webhooks/mailofly) - Choose which events you want to listen for (delivered, clicked, bounced, etc.)
- Copy the Signing Secret (
whsec_...) — you’ll use this to verify requests are actually from Mailofly
What’s next
- Event types & what they contain — see all the events and their payloads
- Verifying webhook signatures — make sure the pings are really from Mailofly
- Retries & debugging — what happens when your server doesn’t respond
