symfony / turbo-smtp-mailer
Symfony TurboSMTP Mailer Bridge
Package info
github.com/symfony/turbo-smtp-mailer
Type:symfony-mailer-bridge
pkg:composer/symfony/turbo-smtp-mailer
Requires
- php: >=8.4.1
- psr/event-dispatcher: ^1
- symfony/mailer: ^7.4|^8.0
Requires (Dev)
- symfony/http-client: ^7.4|^8.0
- symfony/webhook: ^7.4|^8.0
This package is auto-updated.
Last update: 2026-08-01 16:01:53 UTC
README
Provides TurboSMTP integration for Symfony Mailer.
Configuration example:
# SMTP MAILER_DSN=turbosmtp+smtp://KEY:SECRET@default # SMTP (EU region) MAILER_DSN=turbosmtp+smtp://KEY:SECRET@pro.eu.turbo-smtp.com # API MAILER_DSN=turbosmtp+api://KEY:SECRET@default # API (EU region) MAILER_DSN=turbosmtp+api://KEY:SECRET@api.eu.turbo-smtp.com
where:
KEYis your TurboSMTP Consumer KeySECRETis your TurboSMTP Consumer Secret
Use the default host to send through the non-EU endpoint
(api.turbo-smtp.com for the API, pro.turbo-smtp.com for SMTP). EU accounts
must set the corresponding EU host (api.eu.turbo-smtp.com or
pro.eu.turbo-smtp.com).
Webhook
Configure the TurboSMTP Event Webhook in your TurboSMTP dashboard, under Settings > Notifications, to point at your application, then create a route:
framework: webhook: routing: turbosmtp: service: mailer.webhook.request_parser.turbosmtp secret: '%env(TURBOSMTP_WEBHOOK_SECRET)%' # optional, see below
And a consumer:
use Symfony\Component\RemoteEvent\Attribute\AsRemoteEventConsumer; use Symfony\Component\RemoteEvent\Consumer\ConsumerInterface; use Symfony\Component\RemoteEvent\Event\Mailer\MailerDeliveryEvent; use Symfony\Component\RemoteEvent\Event\Mailer\MailerEngagementEvent; use Symfony\Component\RemoteEvent\RemoteEvent; #[AsRemoteEventConsumer(name: 'turbosmtp')] class TurboSmtpConsumer implements ConsumerInterface { public function consume(RemoteEvent $event): void { if ($event instanceof MailerDeliveryEvent) { // handle processed, delivered, deferred, bounce and dropped events } elseif ($event instanceof MailerEngagementEvent) { // handle open, click, unsubscribe and spam events } } }
TurboSMTP does not sign its webhook requests. Authenticating them is optional:
if a route secret is set, requests are expected to carry matching HTTP Basic
credentials, otherwise no check is performed. To enable it, set HTTP Basic
credentials on the webhook URL in your TurboSMTP dashboard
(https://USERNAME:PASSWORD@example.com/webhook/turbosmtp) and configure the
same USERNAME:PASSWORD pair as the route secret. Requests whose credentials
do not match are then rejected with a 403.
Sponsor
This package is looking for a backer.
Help Symfony by sponsoring its development!