Download the PHP package trt/swift-css-inliner-bundle without Composer
On this page you can find all versions of the php package trt/swift-css-inliner-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download trt/swift-css-inliner-bundle
More information about trt/swift-css-inliner-bundle
Files in trt/swift-css-inliner-bundle
Package swift-css-inliner-bundle
Short Description A Swiftmailer plugin that provide css inline feature
License MIT
Informations about the package swift-css-inliner-bundle
swift-css-inliner-bundle
When HTML emails are viewed in browser-based email apps (like YahooMail!, Gmail, Hotmail, etc), those applications strip out the HEAD and BODY tags by default, so the only way to style the content is to place inline the CSS within the style attribute. This is a dirty work for frontenders. This plugin provides exactly the CSS processing to fille the style attributes.
Ex. using the Zurb ink mail template
1. Installation
Add the dependency within the
run php composer.phar install
Enable the bundle (add the following line within the AppKernel.php)
2. Usage - Full Example
3. Usage - Step-by-step example
1. Create the swiftmailer message.
2. AutoDetect the "style" Html tag
The auto detect mode will find css within the style tag
Add your style explicit
ATTENTION
The explicit mode work only with the php IMAP extension installed @see http://www.php.net/manual/en/book.imap.php
Send the message.
4. Configuration options
No configuration is necessary.
It is possible to customize the behaviour of the CssToInlineStyles class. This shows the default options:
All versions of swift-css-inliner-bundle with dependencies
symfony/symfony Version >=2.3.4
symfony/swiftmailer-bundle Version ~2.3
tijsverkoyen/css-to-inline-styles Version ~1.2