> ## Documentation Index
> Fetch the complete documentation index at: https://docs.botcadence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mailgun

> Send transactional email from a verified Mailgun domain

Mailgun sends mail from your own domain: workflow **Send with Mailgun**, plus campaign, nudge, and automation email when you pick this connection.

## Prerequisites

* A Mailgun account with a **verified sending domain**
* A Mailgun private API key
* A From address that uses that domain (display name is optional)
* Know whether the domain is on the US endpoint (`api.mailgun.net`) or the EU endpoint (`api.eu.mailgun.net`)

## Connect

<Steps>
  <Step title="Open Add Integration">
    In the project sidebar, select **Integrations**, then **Add Integration**. Select **Connect** on the **Mailgun** card.
  </Step>

  <Step title="Enter credentials">
    Fill in:

    * **Mailgun API Key** — private API key from the Mailgun dashboard
    * **Sending Domain** — for example `mg.example.com`
    * **From Address** — for example `Support <noreply@mg.example.com>` (must use the sending domain)
    * **Region** — **US** or **EU** to match where the domain lives
  </Step>

  <Step title="Wait for validation">
    The wizard checks the API key and domain. When it succeeds, you see **Mailgun Connected!**
  </Step>
</Steps>

## Verify

On **Integrations**, the row shows **Connected**.

<Check>
  Send a test message to yourself. Confirm it is accepted in the Mailgun logs and that From matches the address you saved.
</Check>

## Use it

### Agent tool

Enable [Send with Mailgun](/docs/build/workflows/tools/send-mailgun) on the agent or workflow **Tools** tab and select this connection.

### Campaigns, nudges, and automations

Select this Mailgun connection wherever the dashboard asks which email integration to send with.

## Limits

* The From address must use the sending domain you entered.
* Choosing the wrong **Region** fails validation or sending even if the API key is correct.
* Mailgun (not Botcadence) enforces domain verification, DNS, and sending limits.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Validation fails">
    Recheck the API key, exact sending domain, From address, and US vs EU region. Confirm the domain is verified in Mailgun.
  </Accordion>

  <Accordion title="Messages are not delivered">
    Check Mailgun logs for rejects or bounces. Confirm DNS (SPF/DKIM) for the domain. Try a recipient that is not blocking new domains.
  </Accordion>

  <Accordion title="The agent does not send with Mailgun">
    Enable **Send with Mailgun** (not only **Send email**) and select this Mailgun connection. **Send email** uses Gmail.
  </Accordion>
</AccordionGroup>
