{"id":20842225,"url":"https://github.com/nauxliu/laravel-sendcloud","last_synced_at":"2025-04-04T16:12:51.605Z","repository":{"id":42187200,"uuid":"46475870","full_name":"nauxliu/Laravel-SendCloud","owner":"nauxliu","description":"适用于 Laravel 5.X 的 SendCloud 驱动","archived":false,"fork":false,"pushed_at":"2019-09-07T04:56:38.000Z","size":23,"stargazers_count":238,"open_issues_count":1,"forks_count":47,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-28T15:05:06.574Z","etag":null,"topics":["laravel-sendcloud","mail-driver","sendcloud"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nauxliu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-19T07:37:48.000Z","updated_at":"2023-11-14T06:26:10.000Z","dependencies_parsed_at":"2022-09-05T15:11:01.736Z","dependency_job_id":null,"html_url":"https://github.com/nauxliu/Laravel-SendCloud","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nauxliu%2FLaravel-SendCloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nauxliu%2FLaravel-SendCloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nauxliu%2FLaravel-SendCloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nauxliu%2FLaravel-SendCloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nauxliu","download_url":"https://codeload.github.com/nauxliu/Laravel-SendCloud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208140,"owners_count":20901570,"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-sendcloud","mail-driver","sendcloud"],"created_at":"2024-11-18T01:23:31.618Z","updated_at":"2025-04-04T16:12:51.587Z","avatar_url":"https://github.com/nauxliu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel-SendCloud\n\n供 Laravel 5.X 使用的 SendCloud 驱动，发送方式完全兼容官方用法，可随时修改配置文件改为其他驱动，而不需要改动业务代码\n\n\u003e `Laravel 5.5` 以下版本请使用 `1.1.3` 版本，并手动添加 ServiceProvier  到 `config/app.php`\n\n## 安装\n\n```\ncomposer require naux/sendcloud\n```\n\n## 配置\n\n在 `.env` 中配置你的密钥， 并修改邮件驱动为 `sendcloud`\n\n```ini\nMAIL_DRIVER=sendcloud\n\nSEND_CLOUD_USER=   # 创建的 api_user\nSEND_CLOUD_KEY=    # 分配的 api_key\n```\n\n## 使用\n\n#### 普通方式发送：\n用法完全和系统自带的一样, 具体请参照官方文档： http://laravel.com/docs/5.1/mail\n\n```php\nMail::send('emails.welcome', $data, function ($message) {\n    $message-\u003efrom('us@example.com', 'Laravel');\n\n    $message-\u003eto('foo@example.com')-\u003ecc('bar@example.com');\n});\n```\n\n#### 模板方式发送\n用法和普通发送类似，不过需要将 `body` 设置为 `SendCloudTemplate` 对象\n\n\u003e  注意：使用模板发送不与其他邮件驱动兼容\n\n```php\n// 模板变量\n$bind_data = ['url' =\u003e 'http://naux.me'];\n$template = new SendCloudTemplate('模板名', $bind_data);\n\nMail::raw($template, function ($message) {\n    $message-\u003efrom('us@example.com', 'Laravel');\n\n    $message-\u003eto('foo@example.com')-\u003ecc('bar@example.com');\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnauxliu%2Flaravel-sendcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnauxliu%2Flaravel-sendcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnauxliu%2Flaravel-sendcloud/lists"}