hexanet/swiftmailer-image-embed
最新稳定版本:v2.1.1
Composer 安装命令:
composer require hexanet/swiftmailer-image-embed
包简介
Swiftmailer plugin to automatically embed images into message
关键字:
README 文档
README
Swiftmailer plugin to automatically embed images into message by using CID (Content-ID).
See https://swiftmailer.symfony.com/docs/messages.html#embedding-inline-media-files for more informations.
Example:
<html> <head></head> <body> <p>some text</p> <img src="images/swiftmailer_rocks.png" alt="placeholder"> </body> </html>
With the plugin the following email will be generated:
<html> <head></head> <body> <p>some text</p> <img src="cid:1eda5ca8666e64003917d06b34bbd2f7@swift.generated" alt="placeholder"> </body> </html>
Installation
composer require hexanet/swiftmailer-image-embed
Usage
use Hexanet\Swiftmailer\ImageEmbedPlugin; $mailer = new Swift_Mailer($yourTransport); $mailer->registerPlugin(new ImageEmbedPlugin());
or for symfony in your services.yaml:
Hexanet\Swiftmailer\ImageEmbedPlugin: arguments: - '%kernel.root_dir%/../web/' tags: [swiftmailer.default.plugin]
The arguments are optional.
Credits
Developed by Hexanet.
License
Swiftmailer Image Embed Plugin is licensed under the MIT license.
统计信息
- 总下载量: 12.56k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-13