overtrue/laravel-sendcloud is a Laravel package for sendcloud sdk for laravel..
It currently has 20 GitHub stars and 856 downloads on Packagist (latest version 2.0.0).
Install it with composer require overtrue/laravel-sendcloud.
Discover more Laravel packages by overtrue
or browse all Laravel packages to compare alternatives.
Last updated
Laravel SendCloud
SendCloud API SDK bindings for Laravel. This package does not register a Laravel Mail transport.
See UPGRADE.md when upgrading from 1.x.
$ composer require overtrue/laravel-sendcloud:^2.0
config/services.php: //...
'sendcloud' => [
'api_user' => env('SENDCLOUD_API_USER', ''),
'api_key' => env('SENDCLOUD_API_KEY', ''),
],
$result = SendCloud::post('/mail/send', [
'from' => '[email protected]',
'to' => '[email protected]',
'subject' => '来自 SendCloud 的第一封邮件!',
'html' => '你太棒了!你已成功的 从SendCloud 发送了一封测试邮件!',
]);
// or
$result = app('sendcloud')->get('addresslist/list');
Additional SDK options such as timeout, connect_timeout, response_type, and base_uri can be added directly to services.sendcloud. Keep custom API endpoints on HTTPS. Credentials are checked when the client is resolved, so booting the application does not require them.
The class binding and app('sendcloud') create a fresh client on each resolution. Laravel facades cache their resolved client until Laravel clears the facade state; configuration changes do not update an already resolved client. Resolve a fresh client after changing configuration. Long-running workers must manage their application and facade lifecycle; Octane compatibility is not claimed by this package.
composer install
composer validate --strict
composer lint
composer test
composer audit
Tests use Orchestra Testbench and a mocked HTTP transport. No SendCloud account or live API requests are needed. CI checks PHP 8.3, 8.4, and 8.5 plus the lowest secure dependency graph.
如果你喜欢我的项目并想支持它,点击这里 :heart:
Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.
MIT