gam6itko/sparkpost-mailer

Symfony SparkPost Mailer Bridge

Installs: 34 743

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 3

Forks: 7

Open Issues: 0

Type:symfony-bridge

v0.3.0 2024-11-26 14:10 UTC

This package is auto-updated.

Last update: 2024-11-26 14:10:57 UTC


README

Build Status Coverage Status

Installation

composer require gam6itko/sparkpost-mailer

Configuration

services.yaml

services:
    mailer.transport_factory.sparkpost:
        class: Gam6itko\Symfony\Mailer\SparkPost\Transport\SparkPostTransportFactory
        arguments: ['@event_dispatcher', '@?http_client', '@?monolog.logger']
        tags:
            - {name: mailer.transport_factory}

.env

Default region

MAILER_DSN=sparkpost+api://api_key@default
MAILER_DSN=sparkpost+smtp://user:password@default:port

EU region

MAILER_DSN=sparkpost+api://api_key@default?region=eu
MAILER_DSN=sparkpost+smtp://user:password@default:port?region=eu

Tests

Using sink server

About sink server

services:
    Gam6itko\Symfony\Mailer\SparkPost\EventListener\SinkEnvelopeListener:
        tags: ['kernel.event_subscriber']

Also

Sparkpost's "transmissions" API reference