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

# Configure Mailgun as an Email Provider

> Instructions on how to configure Mailgun as an email provider with Auth0.

## Prerequisites

* You must have a [Mailgun](https://mailgun.com) account.

* You must configure your provider to allow inbound connections from specific [Auth0 IP addresses](/docs/secure/security-guidance/data-security/allowlist).

## Configure Mailgun

1. Log in to your [Mailgun](https://mailgun.com).
2. Navigate to Mailgun **Sending > Domains**, and add your custom domain. Mailgun allows sending emails from only verified domains.
3. Navigate to Mailgun **Settings > API Keys**. Your API key was created when you signed up for your account; copy it from **Private API Key**.
4. Navigate to Auth0 [Dashboard > Branding > Email Provider](https://manage.auth0.com/#/branding/email_provider).
5. Activate the **Use my own email provider** toggle.
6. Click the **Mailgun** logo.
7. Provide a **From** email address, enter the **Domain** you previously added to Mailgun, enter the Mailgun **API Key** you previously copied, select your **Region**.
8. Click **Save**.

## Send a test email

Send a test email using the **Send Test Email** button. If the configuration is correct, you receive a confirmation email. If you do not receive an email after a few minutes, check your [Auth0 logs](https://manage.auth0.com/#/logs) for error codes.

Once configured, the [Mailgun Dashboard](https://app.mailgun.com/app/dashboard) displays delivery insights for all emails that have been sent to your users.
