PHPackages                             dignac3/mautic-mailgun-callback-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. dignac3/mautic-mailgun-callback-bundle

ActiveMautic-plugin[Mail &amp; Notifications](/categories/mail)

dignac3/mautic-mailgun-callback-bundle
======================================

Mailgun callback handler for Mautic 7: processes bounces, spam complaints and unsubscribes into Mautic DNC.

1.0.0(2mo ago)06↓88.9%MITPHP

Since May 6Pushed 2mo agoCompare

[ Source](https://github.com/dignac3/mautic-mailgun-callback)[ Packagist](https://packagist.org/packages/dignac3/mautic-mailgun-callback-bundle)[ RSS](/packages/dignac3-mautic-mailgun-callback-bundle/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

MauticMailgunCallbackBundle
===========================

[](#mauticmailguncallbackbundle)

Mailgun callback handler plugin tested on **Mautic 7**.

Processes Mailgun webhook events (bounces, spam complaints, unsubscribes) and updates Mautic DNC (Do Not Contact) lists automatically.

---

Installation
------------

[](#installation)

Install plugin via composer :

```
composer require dignac3/mautic-mailgun-callback-bundle
```

Then clear the Mautic cache:

```
php bin/console cache:clear
php bin/console mautic:plugins:reload
```

---

Configuration
-------------

[](#configuration)

### 1. Webhook signing key

[](#1-webhook-signing-key)

Set the environment variable:

```
MAILGUN_WEBHOOK_SIGNING_KEY=your-signing-key
```

> **Where to find it**: Mailgun → *Sending* → *Webhooks* → *HTTP webhook signing key*
> This key is **different** from the API key used for sending.

The plugin reads this via Mautic's configuration system. You can also set it via the Mautic admin UI under *Configuration → Email Settings* (the parameter name is `mailgun_webhook_signing_key`).

### 2. Configure the webhook in Mailgun

[](#2-configure-the-webhook-in-mailgun)

In Mailgun → *Sending* → *Webhooks*, add a webhook for your domain pointing to:

```
https://your-mautic.example.com/mailer/callback

```

Enable the following event types:

- Permanent failure (`failed`)
- Temporary failure (`failed`)
- Spam complaints (`complained`)
- Unsubscribes (`unsubscribed`)

### 3. Sending configuration (no plugin required)

[](#3-sending-configuration-no-plugin-required)

Sending via Mailgun uses native Mautic/Symfony support. Just set your DSN:

```
# API (recommended — fastest) but need the symfony/mailgun-mailer package installed
MAUTIC_MAILER_DSN=mailgun+api://SENDING_KEY:DOMAIN@default?region=eu

# HTTP
MAUTIC_MAILER_DSN=mailgun+https://SENDING_KEY:DOMAIN@default?region=eu

# SMTP
MAUTIC_MAILER_DSN=mailgun+smtp://SMTP_LOGIN:SMTP_PASSWORD@default?region=eu
```

> **Note**: `SENDING_KEY` and `MAILGUN_WEBHOOK_SIGNING_KEY` are **two different keys**.

---

How it works
------------

[](#how-it-works)

Mautic core exposes a public endpoint `POST /mailer/callback` that dispatches a `mautic.email.on_transport_webhook` event. This plugin listens to that event, validates the Mailgun HMAC-SHA256 signature, parses the payload, and calls `TransportCallback::addFailureByAddress()` or `addFailureByHashId()` to add the contact to Mautic's Do no contact list.

---

Running tests
-------------

[](#running-tests)

```
bin/phpunit plugins/MauticMailgunCallbackBundle/Tests --testdox
```

---

License
-------

[](#license)

GPL 3.0

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance86

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

79d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b873a4c1747b9dcbd3beae14b3508059fa119e2654421e253287ad021975de57?d=identicon)[Caroxide](/maintainers/Caroxide)

---

Tags

pluginemailMauticwebhookmailgunbouncednc

### Embed Badge

![Health badge](/badges/dignac3-mautic-mailgun-callback-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dignac3-mautic-mailgun-callback-bundle/health.svg)](https://phpackages.com/packages/dignac3-mautic-mailgun-callback-bundle)
```

###  Alternatives

[etailors/mautic-amazon-ses

Amazon SES Mailer Plugin for Mautic

574.2k](/packages/etailors-mautic-amazon-ses)[pabloveintimilla/mautic-amazon-ses

Mautic 5 plugin that provides Amazon SES as an email transport and callback to process bounces

452.4k](/packages/pabloveintimilla-mautic-amazon-ses)[kouz/laravel-mailgun-email-validation

Laravel email validation that uses the Mailgun API for a three-step validation check.

11145.0k1](/packages/kouz-laravel-mailgun-email-validation)[azine/mailgunwebhooks-bundle

Symfony2 Bundle to easily capture feedback from mailgun.com via their provided webhooks

104.2k](/packages/azine-mailgunwebhooks-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
