symfony/turbo-smtp-mailer

Symfony TurboSMTP Mailer Bridge

Maintainers

Package info

github.com/symfony/turbo-smtp-mailer

Homepage

Type:symfony-mailer-bridge

pkg:composer/symfony/turbo-smtp-mailer

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

8.2.x-dev 2026-08-01 13:00 UTC

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:

  • KEY is your TurboSMTP Consumer Key
  • SECRET is 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!

Resources