mangust-ufo / laravel-elastic-email
Elastic Email 的 Laravel 封装
v0.0.10
2019-04-16 09:33 UTC
Requires
- guzzlehttp/guzzle: >=6.3
- laravel/framework: 5.1.x|5.2.x|5.3.x|5.4.x|5.5.x|5.6.x|5.7.x|5.8.x
README
Elastic Email 的 Laravel 封装
安装
使用 composer CLI 将 Laravel Elastic Email 添加为依赖
composer require mangust-ufo/laravel-elastic-email
接下来,将以下内容添加到您的 config/services.php 文件,并在 .env 文件中添加正确的值
'elastic_email' => [ 'key' => env('ELASTIC_KEY'), 'account' => env('ELASTIC_ACCOUNT') ]
接下来,在 config/app.php 中取消注释 Laravel 的默认 MailServiceProvider。如果您使用的是 < Laravel 5.5,请将 MailServiceProvider 添加到 providers 数组中
'providers' => [ /* * Laravel Framework Service Providers... */ ... // Illuminate\Mail\MailServiceProvider::class, UfoEngineering\LaravelElasticEmail\MailServiceProvider::class, ... ],
最后,通过设置 MAIL_DRIVER=elastic_email 将默认的邮件服务提供商切换到 Elastic Email 在您的 .env 文件中
使用方法
此包与 Laravel 原生的邮件发送器完全相同。请参考 Laravel 的邮件文档。