azlobin / mautic-sendgrid-callback
Mautic plugin to process SendGrid Event Webhook callbacks for bounce and complaint handling.
Package info
github.com/AlexanderZlobinM1/SendgridCallBackBundle
Type:mautic-plugin
pkg:composer/azlobin/mautic-sendgrid-callback
Requires
- php: >=8.1
- mautic/core-lib: ^5.0 || ^6.0 || ^7.0
README
Plugin for Mautic 5/6/7 to process SendGrid Event Webhook callbacks and mark contacts as Do Not Contact for email channel.
This plugin does not send email. Email sending is handled by Symfony's standard SendGrid mailer transport configured in Mautic.
Company: Sales Snap
Author: Alexander Zlobin
Supported mailer schemes
sendgridsendgrid+smtpsendgrid+api
Processed events
The plugin handles these SendGrid event types:
bounce->DoNotContact::BOUNCEDblocked->DoNotContact::BOUNCEDdropped->DoNotContact::BOUNCED(orUNSUBSCRIBEDwhen reason indicates unsubscribe/spam)spamreport->DoNotContact::UNSUBSCRIBEDunsubscribe->DoNotContact::UNSUBSCRIBEDgroup_unsubscribe->DoNotContact::UNSUBSCRIBED
All other events are ignored.
Installation
- Install via Composer:
composer require azlobin/mautic-sendgrid-callback
Or copy plugin directory to your Mautic installation:
cp -R SendgridCallbackBundle /path/to/mautic/docroot/plugins/
Or install from ZIP by extracting SendgridCallbackBundle into:
/path/to/mautic/docroot/plugins/SendgridCallbackBundle
- Reload plugins and clear cache:
php bin/console mautic:plugins:reload php bin/console cache:clear
- Configure SendGrid Event Webhook endpoint:
https://mautic.example.com/mailer/callback
- Enable at least these events in SendGrid Event Webhook settings:
- Bounce
- Blocked
- Dropped
- Spam Reports
- Unsubscribes
- Open plugin card in Mautic Plugins and configure settings directly in plugin modal.
Use the available safe controls (switches/select) to enable/disable event processing and choose dropped-event mapping policy (auto, bounced, unsubscribed).
Notes
- The plugin tries to extract
X-EMAIL-IDfromcustom_argsorunique_argsin webhook payload to link callback to email ID. - If
X-EMAIL-IDis missing, callback still marks contact by email address.