PHP code example of spaceemotion / laravel-sparkpost-options

1. Go to this page and download the library: Download spaceemotion/laravel-sparkpost-options library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spaceemotion / laravel-sparkpost-options example snippets


Spaceemotion\LaravelSparkPostOptions\SparkPostConfigProvider::class,

$mailable->withSwiftMessage(function ($message) use ($options) {
    $message->getHeaders()->addTextHeader(SparkPostConfigProvider::CONFIG_HEADER, json_encode([
        // Your options here...
    ]));
});

ConfigurableTransport::attach($mailable, [
    // Your options here...
]);