Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

Latest commit

 

History

History
38 lines (24 loc) · 1.64 KB

README.md

File metadata and controls

38 lines (24 loc) · 1.64 KB

Swiftmailer Css Inliner Plugin

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version

A swiftmailer plugin that inlines the css (in style tags) into the specific html tags. Uses CssToInlineStyles. Works for both html body or html parts.

Usage

use Openbuildings\Swiftmailer\CssInlinerPlugin;

$mailer = Swift_Mailer::newInstance();

$mailer->registerPlugin(new CssInlinerPlugin());

You can set custom parameters by providing your own CssToInlineStyles object. Like this

use Openbuildings\Swiftmailer\CssInlinerPlugin;
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;

$mailer = Swift_Mailer::newInstance();

$converter = new CssToInlineStyles();
$converter->setUseInlineStylesBlock(false);

$mailer->registerPlugin(new CssInlinerPlugin($converter));

License

Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin as part of clippings.com

Under BSD-3-Clause license, read LICENSE file.