gam6itko/sparkpost-mailer

Symfony SparkPost Mailer Bridge

Installs: 33 902

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 3

Forks: 6

Open Issues: 0

Type:symfony-bridge

v0.2.1 2023-01-26 10:53 UTC

This package is auto-updated.

Last update: 2024-10-26 14:39:23 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