undkonsorten/html-mail-utility
Composer 安装命令:
composer require undkonsorten/html-mail-utility
包简介
Mail Utility: css inlining and plaintext
README 文档
README
What does it do?
Extension html_mail_utility bundles a couple of
third-party libraries which are needed for a HTML newsletter
campaign. Each of them ship with a Fluid view helper or
a Class suitable for USER or USER_INT.
-
Inky is a set of tags like
<container>or<row>that will be transformed to the beloved stone-age<table>markup. This extension makes use of the PHP implementation hampe/inky -
CSS inlining is another common task for newsletter mailings. tijsverkoyen/css-to-inline-styles is integrated for this purpose.
-
For html and plaintext multipart messages, html2text/html2text is bundled so you can convert HTML to plaintext at the very end of your newsletter build process.
All three dependencies are decoupled by interfaces. Concrete implementations can thus be switched by configuration or at runtime.
Installation
Composer install
Just require the extension. Dependencies will be installed automatically.
composer require undkonsorten/html-mail-utility
Non-Composer mode
Using without composer ist not supported!
Fluid ViewHelpers
To start using the ViewHelpers, don‘t forget to include the corresponding namespace in your template files:
<html xmlns:m="http://typo3.org/ns/Undkonsorten/HtmlMailUtility/ViewHelpers">
Inky view helper
<m:format.inky gridColumns="16" aliases="{bricks:'column'}">
Parameters:
- markup (string, optional): You can pass markup in this attribute. Leave unset to use tag content instead.
- gridColums (int, optional): Set this to change the underlying grid system column calculations are based on. Defaults to 12.
- aliases (array, optional): Aliases allow you to define aliases
for inky tags, e.g. write
<bricks>instead of<column>in the example above.
Output:
Markup with inky tags transformed to table legacy.
Beware of uncached actions!!!
Uncached Action will not be rendered with Inky. The transforming won't work and the complete output of this action won't be shown! You have no output of uncached action!
CSS Inline view helper
<m:css.inline cssFile="EXT:my_ext/Resources/Public/Css/Mail.css">
Parameters:
- html (string, optional): You can pass HTML markup in this attribute. Leave unset to use tag content instead.
- css (string, optional): Put additional CSS styles here.
- cssFile (string, optional): You can specify a CSS file for
inlining. You can use
EXT:syntax.
Output:
HTML markup with inline style attributes according to
matching CSS rules.
Plain text view helper
<m:format.plainText>
- html (string, optional): You can pass HTML markup in this attribute. Leave unset to use tag content instead.
- baseUrl (string, optional): If set, this value will be prepended to all on-site links to make them accessible from plain text. Not needed if your markup ships with absolute links.
undkonsorten/html-mail-utility 适用场景与选型建议
undkonsorten/html-mail-utility 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 96 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 03 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 undkonsorten/html-mail-utility 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 undkonsorten/html-mail-utility 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 96
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2024-03-14