{"id":18534197,"url":"https://github.com/spaceemotion/laravel-sparkpost-options","last_synced_at":"2025-10-09T16:41:43.984Z","repository":{"id":57056369,"uuid":"118376014","full_name":"spaceemotion/laravel-sparkpost-options","owner":"spaceemotion","description":"Adds support for adding SparkPost options via the X-MSYS-API header, even when using the API implementation. Update-PRs welcome!  ⚠","archived":false,"fork":false,"pushed_at":"2019-08-11T19:15:38.000Z","size":6,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-02T13:00:00.463Z","etag":null,"topics":["laravel","mail","php","smtp","sparkpost"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spaceemotion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-21T21:35:58.000Z","updated_at":"2020-12-23T08:00:05.000Z","dependencies_parsed_at":"2022-08-24T07:30:26.879Z","dependency_job_id":null,"html_url":"https://github.com/spaceemotion/laravel-sparkpost-options","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceemotion%2Flaravel-sparkpost-options","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceemotion%2Flaravel-sparkpost-options/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceemotion%2Flaravel-sparkpost-options/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceemotion%2Flaravel-sparkpost-options/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spaceemotion","download_url":"https://codeload.github.com/spaceemotion/laravel-sparkpost-options/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248057970,"owners_count":21040669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","mail","php","smtp","sparkpost"],"created_at":"2024-11-06T19:14:53.703Z","updated_at":"2025-10-09T16:41:43.869Z","avatar_url":"https://github.com/spaceemotion.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-sparkpost-options\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Total Downloads][ico-downloads]][link-downloads]\n\nThis package adds support for adding SparkPost messaging options. Even though Laravel allows to set global options,\nthis package adds the functionality for per-message options via the X-MSYS-API header, even when using the\nintegrated \"send via API\" implementation.\n\n**SparkPost Options documentation:**\nhttps://developers.sparkpost.com/api/smtp-api.html#header-using-the-x-msys-api-custom-header\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require spaceemotion/laravel-sparkpost-options\n```\n\n**5.4 and below:** Add the ServiceProvider to your `app.php`: \n\n```php\nSpaceemotion\\LaravelSparkPostOptions\\SparkPostConfigProvider::class,\n```\n\n## Usage\n\nYou can either attach the mail header directly:\n```php\n$mailable-\u003ewithSwiftMessage(function ($message) use ($options) {\n    $message-\u003egetHeaders()-\u003eaddTextHeader(SparkPostConfigProvider::CONFIG_HEADER, json_encode([\n        // Your options here...\n    ]));\n});\n```\n\nor via the integrated `attach` method:\n\n```php\nConfigurableTransport::attach($mailable, [\n    // Your options here...\n]);\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/spaceemotion/laravel-sparkpost-options.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/spaceemotion/laravel-sparkpost-options.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/spaceemotion/laravel-sparkpost-options\n[link-downloads]: https://packagist.org/packages/spaceemotion/laravel-sparkpost-options\n[link-author]: https://github.com/spaceemotion\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaceemotion%2Flaravel-sparkpost-options","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspaceemotion%2Flaravel-sparkpost-options","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaceemotion%2Flaravel-sparkpost-options/lists"}