| Package Data | |
|---|---|
| Maintainer Username: | HyanCat |
| Maintainer Contact: | hyancat@live.cn (HyanCat) |
| Package Create Date: | 2016-04-01 |
| Package Last Update: | 2025-08-09 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-30 03:15:12 |
| Package Statistics | |
|---|---|
| Total Downloads: | 10,011 |
| Monthly Downloads: | 12 |
| Daily Downloads: | 0 |
| Total Stars: | 27 |
| Total Watchers: | 1 |
| Total Forks: | 16 |
| Total Open Issues: | 1 |
使用阿里云的 DirectMail 发送邮件。
当前实现仅支持单一发信接口。
使用 composer 安装文件
composer require hyancat/aliyun-direct-mail:dev-master
在 config/services.php 中添加如下配置:
...
'directmail' => [
'app_key' => env('DIRECT_MAIL_APP_KEY'),
'app_secret' => env('DIRECT_MAIL_APP_SECRET'),
'region' => 'cn-beijing',
'account' => [
'alias' => env('DIRECT_MAIL_ACCOUNT_ALIAS'),
'name' => env('DIRECT_MAIL_ACCOUNT_NAME'),
]
],
...
具体配置含义请参考官方文档。
请根据需要在.env中创建环境配置。
修改 config/mail.php 中的 driver 为 directmail(或者 .env 中的 MAIL_DRIVER)。
修改 config/app.php,在providers字段中添加:
'providers' => [
...
HyanCat\DirectMail\AliyunDirectMailServiceProvider::class,
...
],