louisjimenezp/lmailtemplate
Composer 安装命令:
composer require louisjimenezp/lmailtemplate
包简介
Create Email HTML using templates. Support the mayor of mail client.
README 文档
README
Template to create the HTML to send by email. This HTML is supported for the mayor of mail clients. You can test it using your Litmus account.
How to use
Create your LMailLayout
<?php namespace LMailTemplate\Emails; use LMailTemplate\LMailTable; use LMailTemplate\LMailLayout; class Demo1Email extends LMailLayout { public function loadDefaultTable(){ parent::loadDefaultTable(); $this->addHeader(); $this->addBody(); $this->addFooter(); } }
Create your Header
protected function addHeader(){ $table = $this->getTable(); // body table $options = [ 'height' => 72, // integer 'bgcolor' => '{color-orange}', // background-color 'align' => 'center' // td align ]; $table->addRow(['height' => 40]); // row with height 64 $table->addRow($options, $this->renderHeader()); }
Create your renderHeader
protected function renderHeader(){ $table = $this->getTable(); // body table return $table->renderLink([ // create tag <a> 'href' => '{href-site}', 'html' => $table->renderImage([ // create tag <img> 'src' => '{src-logo}', 'height' => 34 ]) ]); }
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-27