Skip to content

Sparkpost transport implementstion for Symfony Mailer

Notifications You must be signed in to change notification settings

gam6itko/sparkpost-mailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SparkPost transport for Symfony Mailer

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