druidfi / mautic-bounce-webhook-bundle
Handles mailer transport webhook callbacks for bounce and spam events in Mautic.
Package info
github.com/druidfi/mautic-bounce-webhook-bundle
Type:mautic-plugin
pkg:composer/druidfi/mautic-bounce-webhook-bundle
Requires
- php: ^8.1|^8.2|^8.3
- ext-json: *
- mautic/core-lib: ^5.0|^6.0|^7.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-28 08:35:38 UTC
README
A Mautic plugin that handles mailer transport webhook callbacks for bounce and spam events. It processes incoming webhook payloads from email providers and automatically marks contacts as Do Not Contact (DNC) in Mautic.
Supported Providers
- Mailjet — processes
bounce,blocked, andspamevents via the Mailjet Event API
Requirements
- PHP 8.1 or higher
- Mautic 5.x, 6.x or 7.x
Installation
Run the following command in your Mautic root directory:
composer require druidfi/mautic-bounce-webhook-bundle
Then clear the cache and go to the Plugins page in Mautic to install or upgrade the plugin.
Configuration
Set the following environment variables in your Mautic .env or server environment:
| Variable | Required | Description |
|---|---|---|
MAILER_BOUNCE_PROVIDER |
Yes | The active bounce provider. Currently supported: mailjet |
MAILER_CALLBACK_SECRET |
No | A secret token to authenticate incoming webhook requests. If not set, all requests are accepted (not recommended for production). |
Example:
MAILER_BOUNCE_PROVIDER=mailjet MAILER_CALLBACK_SECRET=your-secret-token
Webhook URL
Configure your email provider to POST webhook events to:
https://your-mautic-domain.com/mailer/callback?token=your-secret-token
Bounce Behaviour
| Event | Provider behaviour | Mautic action |
|---|---|---|
| Hard bounce | bounce with hard_bounce: true |
Contact added to DNC (Bounced) |
| Soft bounce | bounce with hard_bounce: false |
Ignored |
| Blocked | blocked |
Contact added to DNC (Bounced) |
| Spam complaint | spam |
Contact added to DNC (Unsubscribed) |
Adding a New Provider
- Create a class implementing
BounceProviderInterface - Add it as a constructor argument in
BounceProviderRegistry - Register it in the
$providersarray with a matching key - Set
MAILER_BOUNCE_PROVIDERto the new key
License
GPL-3.0-only