PHPackages                             openbuildings/swiftmailer-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. openbuildings/swiftmailer-css-inliner

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

openbuildings/swiftmailer-css-inliner
=====================================

Inline the css of your html emails

0.7.0(5y ago)66406.3k—8.2%11[3 issues](https://github.com/OpenBuildings/swiftmailer-css-inliner/issues)[2 PRs](https://github.com/OpenBuildings/swiftmailer-css-inliner/pulls)3BSD-3-ClausePHPPHP ^7.3 || ^8.0CI passing

Since Sep 9Pushed 2mo ago12 watchersCompare

[ Source](https://github.com/OpenBuildings/swiftmailer-css-inliner)[ Packagist](https://packagist.org/packages/openbuildings/swiftmailer-css-inliner)[ RSS](/packages/openbuildings-swiftmailer-css-inliner/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (4)Versions (16)Used By (3)

Swift Mailer CSS Inliner [![Build Status](https://camo.githubusercontent.com/adb69a3c2ecdae0bab3e857a3ec84b8972470f727fccc3ec5ef731927880c2e1/68747470733a2f2f7472617669732d63692e6f72672f4f70656e4275696c64696e67732f73776966746d61696c65722d6373732d696e6c696e65722e737667)](https://travis-ci.org/OpenBuildings/swiftmailer-css-inliner) [![Code Coverage](https://camo.githubusercontent.com/527e6b01675ba2918150fbe798bba8ff5bf868a5aa7f161523a61191e11fb34b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f70656e4275696c64696e67732f73776966746d61696c65722d6373732d696e6c696e65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/OpenBuildings/swiftmailer-css-inliner/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/a8dbf7343915ba0512907386620d5a25d9910dd4165eaebfba66bbe5a4654af3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f70656e4275696c64696e67732f73776966746d61696c65722d6373732d696e6c696e65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/OpenBuildings/swiftmailer-css-inliner/?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/14000d382ea8d7742f7c30d463ec622739d4c8a3f3b7153a4ddb5cde65748e38/68747470733a2f2f706f7365722e707567782e6f72672f6f70656e6275696c64696e67732f73776966746d61696c65722d6373732d696e6c696e65722f762f737461626c652e706e67)](https://packagist.org/packages/openbuildings/swiftmailer-css-inliner)
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#swift-mailer-css-inliner----)

Swift Mailer plugin inlining the CSS (in style tags) into the specific html tags. Uses [CssToInlineStyles](https://github.com/tijsverkoyen/CssToInlineStyles). Works for both html body or html parts.

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

[](#installation)

```
$ composer require openbuildings/swiftmailer-css-inliner
```

Usage
-----

[](#usage)

```
use Openbuildings\Swiftmailer\CssInlinerPlugin;

$mailer = Swift_Mailer::newInstance();

$mailer->registerPlugin(new CssInlinerPlugin());
```

You can set custom parameters by providing your own CssToInlineStyles object. Like this

```
use Openbuildings\Swiftmailer\CssInlinerPlugin;
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;

$mailer = Swift_Mailer::newInstance();

$converter = new CssToInlineStyles();
$converter->setUseInlineStylesBlock(false);

$mailer->registerPlugin(new CssInlinerPlugin($converter));
```

License
-------

[](#license)

Copyright © [Clippings Ltd](https://clippings.com). Created by [Clippings team](https://clippings.github.io/join-us/) and [contributors](https://github.com/OpenBuildings/swiftmailer-css-inliner/graphs/contributors).

Under BSD-3-Clause license, read [LICENSE](https://github.com/OpenBuildings/swiftmailer-css-inliner/blob/master/LICENSE) file.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance55

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 52.6% 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 ~224 days

Recently: every ~253 days

Total

13

Last Release

2037d ago

PHP version history (6 changes)0.1.0PHP &gt;=5.3.2

0.3.0PHP &gt;=5.4

0.5.1PHP &gt;=5.5

0.5.2PHP &gt;=7.0

0.6.0PHP ^7.1

0.7.0PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/506129?v=4)[Harry Dobrev](/maintainers/hkdobrev)[@hkdobrev](https://github.com/hkdobrev)

![](https://avatars.githubusercontent.com/u/4113307?v=4)[Danail Kyosev](/maintainers/dkyosev)[@dkyosev](https://github.com/dkyosev)

![](https://avatars.githubusercontent.com/u/7592650?v=4)[Evstati Zarkov](/maintainers/EZarkov)[@EZarkov](https://github.com/EZarkov)

![](https://avatars.githubusercontent.com/u/745771?v=4)[Filip Georgiev](/maintainers/phgeorgiev)[@phgeorgiev](https://github.com/phgeorgiev)

![](https://avatars.githubusercontent.com/u/490439?v=4)[Zdravko Evstatiev](/maintainers/zedevs)[@zedevs](https://github.com/zedevs)

---

Top Contributors

[![hkdobrev](https://avatars.githubusercontent.com/u/506129?v=4)](https://github.com/hkdobrev "hkdobrev (30 commits)")[![nclsHart](https://avatars.githubusercontent.com/u/833625?v=4)](https://github.com/nclsHart "nclsHart (9 commits)")[![ivank](https://avatars.githubusercontent.com/u/4976?v=4)](https://github.com/ivank "ivank (8 commits)")[![MacDada](https://avatars.githubusercontent.com/u/136261?v=4)](https://github.com/MacDada "MacDada (5 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (2 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (1 commits)")[![nebc-jasonfung](https://avatars.githubusercontent.com/u/47176130?v=4)](https://github.com/nebc-jasonfung "nebc-jasonfung (1 commits)")[![trayanivanov](https://avatars.githubusercontent.com/u/10871511?v=4)](https://github.com/trayanivanov "trayanivanov (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/openbuildings-swiftmailer-css-inliner/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.5k](/packages/laravel-framework)[illuminate/mail

The Illuminate Mail package.

5910.7M572](/packages/illuminate-mail)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)[fedeisas/laravel-mail-css-inliner

Inline the CSS of your HTML emails using Laravel

5954.9M3](/packages/fedeisas-laravel-mail-css-inliner)[wildbit/swiftmailer-postmark

A Swiftmailer Transport for Postmark.

542.9M6](/packages/wildbit-swiftmailer-postmark)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9626.1k68](/packages/open-dxp-opendxp)

PHPackages © 2026

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