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
Requires
- php: >=7.1
- ext-json: *
- symfony/mailer: ^4.4|^5.0|^6.0
Requires (Dev)
- dg/bypass-finals: ^1.2
- php-coveralls/php-coveralls: ^2.2
- phpunit/phpunit: ^7.4||^8.0||^9.0
- symfony/http-client: ^4.4|^5.0|^6.0
README
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
services: Gam6itko\Symfony\Mailer\SparkPost\EventListener\SinkEnvelopeListener: tags: ['kernel.event_subscriber']