emil / inliner
Requires
- php: >=5.4.0
- illuminate/support: 4.*|5.*
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
To make HTML email work, you need to put all CSS rules inline to make sure it works everywhere. It's a pain when developing your code and that's why you want a package to do it on the fly.
This is just a Laravel wrapper for PHP-premailer (https://github.com/onassar/PHP-Premailer)
Installation
Ruby gems
This package require two Ruby Gems: Premailer and Getopt.
$ sudo gem install premailer
$ sudo gem install getopt
Check this Gists for more info on dependencies on Ubuntu (Laravel Homestead): https://gist.github.com/emilsundberg/8ae10ca886058c683d13
Laravel
Begin by installing this package through Composer.
$ composer require snowfire/beautymail
Add Inliner as a service provider in app.php
'providers' => [
Emil\Inliner\InlinerServiceProvider::class,
]
Add Inliner alias
'aliases' => [
Emil\Inliner\Facades\Laravel\Inliner::class
]
Laravel 4.2
Use the 1.x releases/branch
Quick Example
Disable/enable the inliner
The inliner is enabled by default
Inliner::disable(); Inliner::enable();
Check if the inliner is enabled/disabled
Inliner::isDisabled(); Inliner::isEnabled();
Change an option
Inliner::setOption('name', value);
Sending in an option that does not exist will throw
InvalidArgumentException
Options
css_to_attributesinclude_link_tagsinclude_style_tagsinput_encodingpreserve_resetpreserve_stylesremove_classesremove_commentsremove_idsremove_scriptsreplace_html_entities