davidvandertuijn/laravel-mandrill-driver 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

davidvandertuijn/laravel-mandrill-driver

最新稳定版本:2.2

Composer 安装命令:

composer require davidvandertuijn/laravel-mandrill-driver

包简介

Laravel Mandrill Mailer

README 文档

README

This package is deprecated and will not be maintained.

Laravel Mandrill Driver

Total Downloads Latest Stable Version License

Laravel Mandrill Driver

This library adds Mandrill support to Laravel and the ability to capture the Mandrill response via an Event.

Install

composer require davidvandertuijn/laravel-mandrill-driver

Add the MAIL_MAILER and MANDRILL_SECRET environment variables:

MAIL_MAILER=mandrill
MANDRILL_SECRET=your-api-key

Add mandrill config to the config/services.php file:

'mandrill' => [
    'secret' => env('MANDRILL_SECRET'),
],

Add mandrill option to the config/mail.php "mailers" array:

'mandrill' => [
    'transport' => 'mandrill',
],

Publish config:

php artisan vendor:publish --provider="Davidvandertuijn\LaravelMandrillDriver\MandrillServiceProvider"

Mandrill Message Sent Event (optional)

The Event should be registered in the App\Providers\EventServiceProvider.php $listen Array:

use App\Listeners\Mandrill\MessageSent as MandrillMessageSentListener;
use Davidvandertuijn\LaravelMandrillDriver\app\Events\MandrillMessageSent as MandrillMessageSentEvent;

class EventServiceProvider extends ServiceProvider
{
    protected $listen = [
        MandrillMessageSentEvent::class => [
            MandrillMessageSentListener::class
        ],
    ];
}

Define the listener in App\Listeners\Mandrill\MessageSent.php:

namespace App\Listeners\Mandrill;

class MessageSent
{
    public function handle($event)
    {
        // Mandrill ID
        // $event->response[0]->_id
    }
}

统计信息

  • 总下载量: 1.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-28