{"id":17160837,"url":"https://github.com/korridor/symfony-scaleway-tem-mailer","last_synced_at":"2025-04-13T14:11:07.246Z","repository":{"id":65176485,"uuid":"585404858","full_name":"korridor/symfony-scaleway-tem-mailer","owner":"korridor","description":"Scaleway transactional email (TEM) integration for Symfony Mailer (Works with Laravel)","archived":false,"fork":false,"pushed_at":"2024-03-01T14:21:26.000Z","size":36,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T05:12:16.696Z","etag":null,"topics":["laravel","php","scaleway","scaleway-api","symfony","symfony-mailer"],"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/korridor.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":"2023-01-05T04:44:04.000Z","updated_at":"2023-12-25T13:04:47.000Z","dependencies_parsed_at":"2023-02-09T20:30:59.231Z","dependency_job_id":null,"html_url":"https://github.com/korridor/symfony-scaleway-tem-mailer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korridor%2Fsymfony-scaleway-tem-mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korridor%2Fsymfony-scaleway-tem-mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korridor%2Fsymfony-scaleway-tem-mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korridor%2Fsymfony-scaleway-tem-mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/korridor","download_url":"https://codeload.github.com/korridor/symfony-scaleway-tem-mailer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724629,"owners_count":21151561,"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","php","scaleway","scaleway-api","symfony","symfony-mailer"],"created_at":"2024-10-14T22:26:12.199Z","updated_at":"2025-04-13T14:11:07.222Z","avatar_url":"https://github.com/korridor.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Symfony Scaleway TEM mailer\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/korridor/symfony-scaleway-tem-mailer?style=flat-square)](https://packagist.org/packages/korridor/symfony-scaleway-tem-mailer)\n[![License](https://img.shields.io/packagist/l/korridor/symfony-scaleway-tem-mailer?style=flat-square)](license.md)\n[![Supported PHP versions](https://img.shields.io/packagist/php-v/korridor/symfony-scaleway-tem-mailer?style=flat-square)](https://packagist.org/packages/korridor/symfony-scaleway-tem-mailer)\n[![GitHub Workflow Tests](https://img.shields.io/github/actions/workflow/status/korridor/symfony-scaleway-tem-mailer/unittests.yml?label=tests\u0026style=flat-square)](https://github.com/korridor/symfony-scaleway-tem-mailer/actions/workflows/unittests.yml)\n[![GitHub Workflow Lint](https://img.shields.io/github/actions/workflow/status/korridor/symfony-scaleway-tem-mailer/lint.yml?label=lint\u0026style=flat-square)](https://github.com/korridor/symfony-scaleway-tem-mailer/actions/workflows/lint.yml)\n[![Codecov](https://img.shields.io/codecov/c/github/korridor/symfony-scaleway-tem-mailer?style=flat-square)](https://codecov.io/gh/korridor/symfony-scaleway-tem-mailer)\n\n\u003e [!WARNING]  \n\u003e This package is no longer necessary since Symfony created their own mailer for Scaleway TEM.\n\u003e\n\u003e Please use this instead: [Symfony Mailer - Scaleway](https://github.com/symfony/scaleway-mailer)\n\n## Installation\n\nYou can install the package via composer with following command:\n\n```bash\ncomposer require korridor/symfony-scaleway-tem-mailer\n```\n\n### Requirements\n\nThis package is tested for the following Laravel and PHP versions:\n\n- 9.* (PHP 8.1)\n\n## Usage examples\n\n### Laravel\n\nAdd the following code to the `AppServiceProvider`:\n\n```php\nuse Korridor\\SymfonyScalewayTemMailer\\Transport\\ScalewayApiTransport;\nuse Korridor\\SymfonyScalewayTemMailer\\Transport\\ScalewaySmtpTransport;\n\n    // ..\n\n    /**\n     * Bootstrap any application services.\n     *\n     * @return void\n     */\n    public function boot(): void\n    {\n        // ...\n        Mail::extend('scaleway-api', function (array $config = []) {\n            return new ScalewayApiTransport($config['token'], $config['region'], $config['project_id']);\n        });\n        Mail::extend('scaleway-smtp', function (array $config = []) {\n            return new ScalewaySmtpTransport($config['token'], $config['region'], $config['project_id']);\n        }); \n    }\n\n```\n\nNow add the following lines to the `config/mail.php` file in the `mailers` array:\n\n```php\n'scaleway' =\u003e [\n    'transport' =\u003e 'scaleway-api',\n    'region' =\u003e env('MAIL_SCALEWAY_REGION', 'fr-par'),\n    'token' =\u003e env('MAIL_SCALEWAY_TOKEN'),\n    'project_id' =\u003e env('MAIL_SCALEWAY_PROJECT_ID'),\n],\n```\n\nIf you want to use the SMTP integration instead use following lines:\n\n```php\n'scaleway' =\u003e [\n    'transport' =\u003e 'scaleway-smtp',\n    'region' =\u003e env('MAIL_SCALEWAY_REGION', 'fr-par'),\n    'token' =\u003e env('MAIL_SCALEWAY_TOKEN'),\n    'project_id' =\u003e env('MAIL_SCALEWAY_PROJECT_ID'),\n],\n```\n\n### Symfony\n\nAdd the following lines to the `config/services.yaml` file:\n\n```yaml\nmailer.transport_factory.scaleway:\n    class: Korridor\\SymfonyScalewayTemMailer\\Transport\\ScalewayTransportFactory\n    parent: mailer.transport_factory.abstract\n    tags:\n        - {name: mailer.transport_factory}\n```\n\nThen `MAILER_DSN` environment variable for example like this:\n\n```dotenv\nMAILER_DSN=scaleway+api://SCW_PROJECT_ID:SCW_SECRET_KEY@api.scaleway.com\n```\n\n## Contributing\n\nI am open for suggestions and contributions. Just create an issue or a pull request.\n\n### Local docker environment\n\nThe `docker` folder contains a local docker environment for development.\nThe docker workspace has composer and xdebug installed.\n\n```bash\ndocker-compose run workspace bash\n```\n\n### Testing\n\nThe `composer test` command runs all tests with [phpunit](https://phpunit.de/).\nThe `composer test-coverage` command runs all tests with phpunit and creates a coverage report into the `coverage`\nfolder.\n\n### Codeformatting/Linting\n\nThe `composer fix` command formats the code with [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).\nThe `composer lint` command checks the code with [phpcs](https://github.com/squizlabs/PHP_CodeSniffer).\n\n## Credits\n\nThe structure of the repository is inspired by the project [symfony/postmark-mailer](https://github.com/symfony/postmark-mailer).\n\n## License\n\nThis package is licensed under the MIT License (MIT). Please see [license file](license.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorridor%2Fsymfony-scaleway-tem-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkorridor%2Fsymfony-scaleway-tem-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorridor%2Fsymfony-scaleway-tem-mailer/lists"}