hampel / swiftmailer-sparkpost
A Swift Mailer Transport for SparkPost
1.2.0
2020-09-17 04:12 UTC
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ^6.0|^7.0
- swiftmailer/swiftmailer: ^6.0
Requires (Dev)
- phpunit/phpunit: ^8.0|^9.0
This package is auto-updated.
Last update: 2024-12-14 07:46:37 UTC
README
By Simon Hampel
Description
Standalone implementation of Laravel's SparkPost Mail Driver from illuminate/mail - provides a Swift Mailer v6 implementation for SparkPost.
This package is inspired by: https://github.com/vemcogroup/laravel-sparkpost-driver which uses the SparkPost mail driver from Laravel 5.8.x
Installation
You can install the package via composer:
composer require hampel/swiftmailer-sparkpost
Usage
The SparkPost options available are defined in the API: SparkPost options
$sparkpostOptions = [ 'options' => [ 'open_tracking' => false, 'click_tracking' => true, 'transactional' => true, ], 'campaign_id' => 'foo', ]; $transport = new SparkPostTransport( new GuzzleHttp\Client, 'MYSPARKPOSTAPIKEY', $sparkpostOptions ); // create a new Swift_Message $message = ... $result = $transport->send($message);