PHPackages                             strack/email\_templates - 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. [Templating &amp; Views](/categories/templating)
4. /
5. strack/email\_templates

ActiveLibrary[Templating &amp; Views](/categories/templating)

strack/email\_templates
=======================

Utility package to parse templates for emails easily

1.0.2(7y ago)019MITPHP

Since Oct 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/weijer/strack_email_templates)[ Packagist](https://packagist.org/packages/strack/email_templates)[ Docs](https://github.com/mkeitsch/utility-emailtemplates)[ RSS](/packages/strack-email-templates/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

MKcom.Utility.EmailTemplates
============================

[](#mkcomutilityemailtemplates)

Simple class for parsing email templates written in HTML with variable data.

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

[](#installation)

### via Composer

[](#via-composer)

**Note:** This package is not registered on packagist.org.

```
$ composer config repositories.mkcom/utility-emailtemplates vcs git@github.com:mkeitsch/utility-emailtemplates.git

$ composer require mkcom/utility-emailtemplates
```

Using EmailTemplates
--------------------

[](#using-emailtemplates)

Create a simple HTML file for an email template.

Use `subject` instead of `title` for your email subject in the head section.

Double curly braces `{{}}` are used for defining variables. You can use it wherever you want in the template. I recommend using camelCased variable names. These are tested. But you can use and test whatever you want.

```
>

            My Subject For A New Email

        Hey {{firstName}},

        this is a my email template.

        Greetings {{senderName}} :)

```

Create a new email template by just instantiating the `EmailTemplate` class with the location of the template file and an array of variables that should be inserted as arguments.

```
$emailTemplate = new EmailTemplate(__DIR__.'/Templates/myEmailTemplate.html', array(
    'firstName' => 'John',
    'senderName' => 'Max',
));

$emailBody = $emailTemplate->getBody();
$emailSubject = $emailTemplate->getSubject();
```

Perfect Neos Flow Integration
-----------------------------

[](#perfect-neos-flow-integration)

Works perfectly with **Neos Flow** and the `resource://`-Wrapper:

```
$emailTemplate = new EmailTemplate('resource://Acme.Demo/Private/Email/Template/FooBar.html', array(...));
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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

Total

4

Last Release

2892d ago

Major Versions

0.1 → 1.02016-10-31

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/strack-email-templates/health.svg)

```
[![Health](https://phpackages.com/badges/strack-email-templates/health.svg)](https://phpackages.com/packages/strack-email-templates)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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