tadcms/email-template
Composer 安装命令:
composer require tadcms/email-template
包简介
Add and manager email template for Laravel
README 文档
README
Add and manager email template for Laravel
Features
- Email template table
- Add/Edit/Manager email template
- Mail list send history
- Send mail with cronjob
Install
- Install package
composer require tadcms/laravel-email-template
- Migration
php artisan migrate
- Setup The Scheduler: Add command to your server
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
View more: Starting The Scheduler
Usage
Make Email Template
use Tadcms\EmailTemplate\Models\EmailTemplate;
EmailTemplate::create([
'code' => 'test_mail',
'subject' => 'Send email test for {name}',
'body' => '<p>Hello {name},</p>
<p>This is the test email</p>',
'params' => [
'name' => 'Your Name',
],
]);
Send email with template
use Tadcms\EmailTemplate\EmailService;
EmailService::make()
->withTemplate('test_mail')
->setEmails('test@example.com')
->setParams([
'name' => 'The Anh',
])
->send();
License
The package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-30