PHPackages                             cethyworks/twig-swift-message - 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. cethyworks/twig-swift-message

AbandonedArchivedLibrary

cethyworks/twig-swift-message
=============================

Provides a Swift\_Message builder using twig.

v2.0(8y ago)0217MITPHPPHP &gt;=5.6.17

Since Jul 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Cethy/TwigSwiftMessage)[ Packagist](https://packagist.org/packages/cethyworks/twig-swift-message)[ RSS](/packages/cethyworks-twig-swift-message/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Cethyworks/TwigSwiftMessage
===========================

[](#cethyworkstwigswiftmessage)

Build `Swift_Message`s with twig and optionally inline the css with [CssToInlineStyles](https://github.com/tijsverkoyen/CssToInlineStyles).

[![CircleCI](https://camo.githubusercontent.com/c630c4d143911f73977510221eb35bde361ac639fd0d8f0209351e92b29bbfcd/68747470733a2f2f636972636c6563692e636f6d2f67682f43657468792f5477696753776966744d6573736167652f747265652f6d61737465722e7376673f7374796c653d736869656c64)](https://circleci.com/gh/Cethy/TwigSwiftMessage/tree/master)

Install
-------

[](#install)

1\. Composer require

```
$ composer require cethyworks/twig-swift-message

```

How to use
----------

[](#how-to-use)

1\. Create your twig template using the 3 blocks `subject`, `body_html` and/or `body_txt` (**all** blocks are optional).

```
{% block subject %}subject{% endblock subject %}

{% block style %}.baz {color:red;}{% endblock style %}

{% block body_html %}
    {{ foo }}
    bar
{% endblock body_html %}

{% block body_txt %}
    {{ foo }}
    bar
{% endblock body_txt %}

```

2\. Call TwigSwiftMessageBuilder::buildMessage()

```
/** @var Swift_Message $swiftMessage */
$swiftMessage = $messageBuilder->buildMessage($templateName, $templateParameters);

```

3\. Add your recipient(s). And sent it !

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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 ~24 days

Total

2

Last Release

3195d ago

Major Versions

v1.0 → v2.02017-08-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0992307e9a9d414b451beb664b8313ed22f77d6b5b949a9f199b2114d6cae4d?d=identicon)[Cethy](/maintainers/Cethy)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cethyworks-twig-swift-message/health.svg)

```
[![Health](https://phpackages.com/badges/cethyworks-twig-swift-message/health.svg)](https://phpackages.com/packages/cethyworks-twig-swift-message)
```

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

23018.5M55](/packages/twig-cssinliner-extra)[open-dxp/opendxp

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

7310.3k29](/packages/open-dxp-opendxp)[abydahana/aksara

Aksara is a CodeIgniter based CRUD Toolkit you can use to build complex applications become shorter, secure and more reliable just in a few lines of code. Serving both CMS or Framework, produce both HEADLESS (RESTful API) or TRADITIONAL (Browser Based), just by writing single controller. Yet it's reusable, scalable and ready to use!

1101.2k](/packages/abydahana-aksara)

PHPackages © 2026

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