PHPackages                             igonics/laravel-mail-css-inliner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. igonics/laravel-mail-css-inliner

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

igonics/laravel-mail-css-inliner
================================

Laravel 5 Mail CSS Inliner Service

1.0.0(10y ago)13MITPHPPHP &gt;=5.3.0

Since Jun 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/IGonics/laravel-mail-css-inliner)[ Packagist](https://packagist.org/packages/igonics/laravel-mail-css-inliner)[ RSS](/packages/igonics-laravel-mail-css-inliner/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Laravel 5 Mail CSS Inliner
==========================

[](#laravel-5-mail-css-inliner)

Why?
----

[](#why)

Most email clients won't render CSS (on a `` or a ``). 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?
----

[](#how)

Using a wonderful [CSS inliner package](https://github.com/jjriv/emogrifier) wraped in a SwiftMailer plugin and served as a Service Provider. It works without configuration

Transforming:

```

            h1 {
                font-size: 24px;
                color: #000;
            }

        Your content

```

Into this:

```

        Your content

```

Installation
------------

[](#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

```
{
  "require": {
        "igonics/laravel-mail-css-inliner": "~1.0"
    }
}
```

Next, update Composer from the Terminal:

```
$ composer update
```

Once this operation completes, you must add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

```
'IGonics\LaravelMailCssInliner\LaravelMailCssInlinerServiceProvider',
```

Found a bug?
------------

[](#found-a-bug)

Please, let me know! Send a pull request or a patch. Questions? Ask! I will respond to all filed issues.

Inspiration
-----------

[](#inspiration)

This package was greatly inspired by [Emogrifier CSS Inliner](https://github.com/jjriv/emogrifier) and [Fede Isas's](https://github.com/fedeisas/laravel-mail-css-inliner) implementation of a similar service provider. The implementation became less configurable however with its main dependency [CssToInlineStyles](https://github.com/tijsverkoyen/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
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3656d ago

Major Versions

0.0.1 → 1.0.02016-06-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7912?v=4)[Gary Gordon](/maintainers/ggordon)[@ggordon](https://github.com/ggordon)

---

Top Contributors

[![gggordon](https://avatars.githubusercontent.com/u/6540335?v=4)](https://github.com/gggordon "gggordon (17 commits)")

### Embed Badge

![Health badge](/badges/igonics-laravel-mail-css-inliner/health.svg)

```
[![Health](https://phpackages.com/badges/igonics-laravel-mail-css-inliner/health.svg)](https://phpackages.com/packages/igonics-laravel-mail-css-inliner)
```

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[illuminate/mail

The Illuminate Mail package.

5910.4M475](/packages/illuminate-mail)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2022.1M6](/packages/laravel-notification-channels-apn)[illuminate/notifications

The Illuminate Notifications package.

483.0M1.1k](/packages/illuminate-notifications)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
