Can Mailgun receive emails? Yes. Here is how inbound email works
Mailgun is known for sending, but it can also receive email for your domain. Incoming messages are not put in an inbox, though. Your routes decide where each message goes.
Yes, Mailgun can receive email
Receiving email with Mailgun takes three pieces:
- MX records that send your domain's mail to Mailgun
- Inbound routes that match incoming messages
- Actions that forward, store, or POST each message
1. Point your MX records to Mailgun
In your DNS provider, add the MX records Mailgun shows for your domain. For US-region accounts these are usually mxa.mailgun.org and mxb.mailgun.org; EU accounts use mxa.eu.mailgun.org and mxb.eu.mailgun.org.
mail.example.com if your main domain already receives mail with Google Workspace or Microsoft 365. MX records decide which service gets the mail, so pointing the main domain at Mailgun moves all of its mail.2. Create inbound routes
Routes are rules that run on every incoming message, in priority order. Each route has a filter:
| Filter | What it matches |
|---|---|
match_recipient("support@example.com") | The recipient address (regular expressions allowed) |
match_header("subject", ".*invoice.*") | A MIME header such as the subject |
catch_all() | Anything no earlier route matched (give it the lowest priority) |
3. Choose what happens to the message
- forward("you@gmail.com"): send a copy to another address. See Mailgun forward email.
- forward("https://your-app.com/inbound"): POST the parsed message to a webhook.
- store(): keep the message on Mailgun for up to 3 days and optionally notify a URL.
- stop(): do not evaluate lower-priority routes.
Check Mailgun's current pricing page to see whether inbound routing is included in your plan.
Mailgun email not received? Check these
- MX records point to Mailgun, and DNS changes have propagated
- A route matches the exact recipient (or a catch_all exists)
- No higher-priority route with stop() swallows the message first
- Your webhook URL is public, uses HTTPS, and returns 200
- The sender is not hitting a spam or suppression rule
Read received Mailgun email in a real inbox
Routes move messages around, but you still need somewhere to read and answer them. Inboxes connects to your Mailgun account, creates per-mailbox routes and a webhook, and saves every received message in a Gmail-like inbox, with threads, search, and reply from your own domain. Mailgun has no inbox of its own: read about Mailgun webmail.
Frequently asked questions
Yes. Once your domain MX records point to Mailgun, Mailgun accepts incoming mail and runs your inbound routes, which can forward the message, store it, or POST it to a webhook.
Wherever your routes send them: another email address, an HTTP endpoint (webhook), or temporary storage on Mailgun for up to 3 days. Mailgun has no inbox where they collect.
The usual causes are MX records that do not point to Mailgun, no route matching the recipient, a webhook URL that is down or not public, or a route with stop() placed above the one you expect.
Forwarding needs no code. Webhooks need an endpoint that accepts the POST. A Mailgun webmail client like Inboxes creates the routes and webhooks for you.