# Mailgun solution docs

- [Mailgun returns 401 and your API key is fine: the EU/US region trap](https://agenticboilerplate.com/cookbook/mailgun/eu-vs-us-region-endpoints): A Mailgun domain lives in the region it was created in. Calling the wrong regional host returns 401 Unauthorized, which reads exactly like a bad API key.
- [Mailgun says the message was queued and nobody receives it: sandbox domain limits](https://agenticboilerplate.com/cookbook/mailgun/sandbox-domain-limits): The sandbox domain accepts every send and delivers only to five addresses you authorised. Recognise it, use it deliberately, and know when to stop.
- [Suppression lists in Mailgun: stop maintaining your own bounce table](https://agenticboilerplate.com/cookbook/mailgun/suppression-lists): Mailgun stores bounces, complaints and unsubscribes per domain and refuses to send to them. Read that list instead of building a table you have to keep in sync.
- [Mailgun templates and recipient variables versus rendering HTML in your app](https://agenticboilerplate.com/cookbook/mailgun/template-variables-vs-rendered-html): Mailgun stores Handlebars templates in its dashboard and substitutes variables at send time. Rendering in your app instead keeps email in code review: here is when each one wins.
- [Open tracking, click tracking and why they are off by default](https://agenticboilerplate.com/cookbook/mailgun/tracking-pixels-and-privacy): Mailgun's tracking adds a pixel and rewrites every link. Both are personal data under GDPR, both cost deliverability, and neither belongs on a magic link.

---

Agentic Boilerplate: A Next.js repo your agent already knows. Free during launch, then $99 once.

- Site map for agents: https://agenticboilerplate.com/llms.txt
- Public API: https://agenticboilerplate.com/openapi.json
- Contact: agenticstudio@gmail.com
