saskoh/conaktiv-emogrifyplugin 问题修复 & 功能扩展

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

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

saskoh/conaktiv-emogrifyplugin

Composer 安装命令:

composer require saskoh/conaktiv-emogrifyplugin

包简介

Inline CSS in HTML using Emogrifier.

README 文档

README

Scrutinizer Code Quality Code Coverage Build Status Latest Stable Version

Inline CSS in HTML using Emogrifier.

Installation and requirements

Install via composer, using:

composer require saskoh/conaktiv-emogrifyplugin

Requirements:

  • PHP 5.6+
  • Emogrifier 3.x

Usage

By default, the plugin will inline CSS that is part of the HTML, eg. styles defined in <style> tags. You can instantiate the plugin with your own Emogrifier instance or change properties of the emogrifier instance. For a list of options, please head over to the Emogrifier documentation.

Please note, that the plugin is using one instance of Emogrifier to convert all message-parts, so the settings you make apply to all converted html parts.

Supplying custom CSS

$plugin = new EmogrifierPlugin();
$plugin->getEmogrifier()->setCss('.customStyle: { color: red; };');

Please note: Calling setHtml on the Emogrifier instance doesn't have an effect, since it will be replaced with the message body!

Example

Here's how you could use the plugin to send emails with custom styles loaded from a file:

$emogrifier = new Pelago\Emogrifier(); $emogrifier->setCss(file_get_contents( /* path to your CSS file */ ));

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2021-04-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固