2017 © Pedro Peláez
 

library inliner

image

emil/inliner

  • Saturday, March 12, 2016
  • by emilsundberg
  • Repository
  • 5 Watchers
  • 18 Stars
  • 7,875 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 6 Versions
  • 4 % Grown

The README.md

Laravel HTML Email Inliner

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., (*1)

This is just a Laravel wrapper for PHP-premailer (https://github.com/onassar/PHP-Premailer), (*2)

Installation

Ruby gems

This package require two Ruby Gems: Premailer and Getopt., (*3)

$ 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, (*4)

Laravel

Begin by installing this package through Composer., (*5)

$ composer require snowfire/beautymail

Add Inliner as a service provider in app.php, (*6)

'providers' => [
    Emil\Inliner\InlinerServiceProvider::class,
]

Add Inliner alias, (*7)

'aliases' => [
    Emil\Inliner\Facades\Laravel\Inliner::class
]

Laravel 4.2

Use the 1.x releases/branch, (*8)

Quick Example

Disable/enable the inliner

The inliner is enabled by default, (*9)

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, (*10)

Options
  • css_to_attributes
  • include_link_tags
  • include_style_tags
  • input_encoding
  • preserve_reset
  • preserve_styles
  • remove_classes
  • remove_comments
  • remove_ids
  • remove_scripts
  • replace_html_entities

The Versions

12/03 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

12/03 2016

2.0.0

2.0.0.0

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

21/11 2014

1.x-dev

1.9999999.9999999.9999999-dev

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

21/11 2014

v1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

27/07 2014

v1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

27/07 2014

v1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

by Emil Sundberg