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

# Mailgun Integration

> Connect your Mailgun account to SendPost for unified email management, advanced analytics, and enhanced deliverability monitoring.

SendPost's Mailgun integration allows you to use your existing Mailgun account as a **Third-Party Sending Provider (TPSP)**. This means you can:

* Send emails through Mailgun while using SendPost's unified API
* Receive and process Mailgun events (opens, clicks, bounces, etc.) in SendPost
* View all email analytics in one centralized dashboard
* Apply SendPost's intelligent routing and throttling to your Mailgun traffic

***

## Why Use Mailgun with SendPost?

| Feature                  | Mailgun Alone | Mailgun + SendPost                                |
| ------------------------ | ------------- | ------------------------------------------------- |
| Multiple ESP management  | ❌             | ✅ Unified dashboard for all providers             |
| Cross-provider analytics | ❌             | ✅ Compare performance across ESPs                 |
| Advanced throttling      | Basic         | ✅ Per-provider rate limiting (Gmail, Yahoo, etc.) |
| Failover routing         | ❌             | ✅ Automatic fallback to other providers           |
| Centralized event logs   | ❌             | ✅ All events in one place                         |
| Sub-account management   | Limited       | ✅ Flexible sub-account hierarchy                  |

***

## What's Covered in This Guide

<CardGroup cols={2}>
  <Card title="Setting Up" icon="gear" href="/guides/mailgun/setup">
    Configure Mailgun as a provider in SendPost with automatic webhook setup
  </Card>

  <Card title="Sending Emails" icon="paper-plane" href="/guides/mailgun/sending-emails">
    Send emails through Mailgun using the SendPost API with IP Pool routing
  </Card>

  <Card title="Event Types" icon="bell" href="/guides/mailgun/event-types">
    Understand Mailgun event types and how they map to SendPost
  </Card>

  <Card title="Analytics" icon="chart-line" href="/guides/mailgun/analytics">
    Track opens, clicks, bounces and configure rate limiting
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/guides/mailgun/troubleshooting">
    Common issues, FAQs, and getting help
  </Card>
</CardGroup>

***

## Quick Reference

### Key Endpoints

| Purpose     | URL                              |
| ----------- | -------------------------------- |
| Send Email  | `POST /api/v1/subaccount/email/` |
| View Events | SendPost Dashboard → Events      |

### Setup Checklist

<Steps>
  <Step title="Create Mailgun API Key">
    Create API key with full access permissions in your Mailgun account
  </Step>

  <Step title="Add Provider">
    Add Mailgun provider in SendPost dashboard with your API key and domain
  </Step>

  <Step title="Configure IP Pool">
    Create an IP Pool in SendPost configured to route traffic to Mailgun
  </Step>

  <Step title="Whitelist Domain">
    Whitelist your sending domain in SendPost (same domain used in Mailgun)
  </Step>

  <Step title="Test">
    Send a test email with the `ippool` parameter
  </Step>

  <Step title="Confirm Events">
    Confirm events appear in SendPost analytics
  </Step>
</Steps>
