kevinzheng / laravel-directmail by kevinzheng
forked from HyanCat/aliyun-direct-mail

Aliyun Direct Mail for Laravel.
95
0
1
Package Data
Maintainer Username: kevinzheng
Maintainer Contact: realkvz@gmail.com (Kevin Zheng)
Package Create Date: 2016-11-23
Package Last Update: 2016-11-23
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-22 03:11:08
Package Statistics
Total Downloads: 95
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Aliyun DirectMail for Laravel 5

使用阿里云的 DirectMail 发送邮件。

当前实现仅支持单一发信接口

安装

  1. 使用 composer 安装文件

    composer require kevinzheng/laravel-directmail
    
  2. 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中创建环境配置。

  3. 修改 config/mail.php 中的 driverdirectmail(或者 .env 中的 MAIL_DRIVER)。

  4. 修改 config/app.php,在providers字段中添加:

    'providers' => [
        ...
        KVZ\DirectMail\AliyunDirectMailServiceProvider::class,
        ...
    ],