orainteractive/cakephp3-email-template
最新稳定版本:v1.1.0
Composer 安装命令:
composer require orainteractive/cakephp3-email-template
包简介
Email Template for CakePHP3 based on HTML Email Layouts by MailChimp
README 文档
README
About
Email Template for CakePHP 3 is based on HTML Email Layouts by MailChimp and Gourmet/Email.
Specifically, using a modified version of the Base Boxed Basic Query resposive template.
##Installation
The recommended installation way is through Composer.
$ composer require orainteractive/cakephp3-email-template
Load the plugin in config/bootstrap.php:
Plugin::load('Ora/Email');
Update your email configuration in config/app.php, example shows default configuration:
'Email' => [ 'default' => [ 'transport' => 'default', 'from' => 'you@localhost', 'charset' => 'utf-8', 'headerCharset' => 'utf-8', 'layout' => 'Ora/Email.default', 'emailFormat' => 'both', 'helpers' => [ 'Ora/Email.Email' => [ 'modifiers' => [ 'inline' => true, 'clean' => true, ], 'regEx' => [ '' => [ '/<!--(.|\s)*?-->/' => '', '!/\*[^*]*\*+([^/][^*]*\*+)*/!' => '', ], ], 'template' => [ 'company' => 'My Company LLC', 'fontColor' => '#000000', 'backgroundColor' => '#FFFFFF', 'foregroundColor' => '#CECECE', 'logo' => 'https://s3.amazonaws.com/assets.myapp.com/email/logo.png', 'homeLink' => 'http://myapp.com', 'facebookLink' => 'http://facebook.com/myapp', 'twitterLink' => 'http://twitter.com/myapp', ], ], ], ], ],
Documentation
The following modifier properties can be used to modify the HTML prior to sending:
Inline CSS uses tijsverkoyen/CssToInlineStyles
The following template properties can be used in the template configuration:
Usage
In your app, send Emails as normal:
use Cake\Network\Email\Email; $email = new Email('default'); $email->to($user->email) ->subject('Welcome to my app!') ->template('welcome') ->send('Hope you enjoy using my app.');
License
Copyright (c) 2015, Ora Interactive and licensed under The MIT License.
统计信息
- 总下载量: 498
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-10