Download the PHP package igonics/laravel-mail-css-inliner without Composer
On this page you can find all versions of the php package igonics/laravel-mail-css-inliner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download igonics/laravel-mail-css-inliner
More information about igonics/laravel-mail-css-inliner
Files in igonics/laravel-mail-css-inliner
Package laravel-mail-css-inliner
Short Description Laravel 5 Mail CSS Inliner Service
License MIT
Informations about the package laravel-mail-css-inliner
Laravel 5 Mail CSS Inliner
Why?
Most email clients won't render CSS (on a <link>
or a <style>
). The solution is to inline your CSS directly into the HTML. Doing this by hand is tedious and difficult to maintain.
The goal of this package is to automate the process of inlining that CSS before sending the emails.
How?
Using a wonderful CSS inliner package wraped in a SwiftMailer plugin and served as a Service Provider. It works without configuration
Transforming:
Into this:
Installation
Begin by installing this package through Composer. Edit your project's composer.json
file to require igonics/laravel-mail-css-inliner
.
This package requires Laravel 5.x
Next, update Composer from the Terminal:
Once this operation completes, you must add the service provider. Open app/config/app.php
, and add a new item to the providers array.
Found a bug?
Please, let me know! Send a pull request or a patch. Questions? Ask! I will respond to all filed issues.
Inspiration
This package was greatly inspired by Emogrifier CSS Inliner and Fede Isas's implementation of a similar service provider. The implementation became less configurable however with its main dependency CssToInlineStyles becoming less configurable with it's latest update which presented breaking changes to the existing API. This package was created as a more configurable solution with the ability to also handle poorly formatted HTML, which the previous implementations had issues with.
License
This package is open-sourced software licensed under the MIT license
All versions of laravel-mail-css-inliner with dependencies
swiftmailer/swiftmailer Version ~5.0
illuminate/support Version ~5.2
pelago/emogrifier Version 1.0.1