homicity / laravel-mandrill
一个用于使用 Mandrill 模板的 Laravel 邮件宏
101
2018-11-21 18:58 UTC
Requires
- php: ^7.0
- laravel/framework: ~5.5.0|~5.6.0|~5.7.0
- mandrill/mandrill: ^1.0
Requires (Dev)
- orchestra/testbench: ~3.5.0|~3.6.0|~3.7.0
- phpunit/phpunit: ^6.2|^7.0
This package is auto-updated.
Last update: 2024-09-12 00:49:39 UTC
README
安装
composer require homicity/laravel-mandrill
然后发布配置文件
php artisan vendor:publish --provider="Homicity\MandrillMailable\Providers\MandrillMailableServiceProvider" --tag="config"
配置
将其添加到您的 .env 文件中
MANDRILL_SECRET={your mandrill api key}
MANDRILL_FROM_EMAIL={your from email address}
MANDRILL_FROM_NAME={your from name}
用法
Mail::mandrill()
->to('john@example.com')
->name('John Doe')
->templateName('template-name')
->fromEmail('no-reply@example.com')
->fromName('Example Website')
->subject('Hello Mandrill')
->send();