PHPackages                             cwmoss/emil-lib - 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. cwmoss/emil-lib

ActiveLibrary

cwmoss/emil-lib
===============

send emails using templates

01↑2900%PHP

Since Jun 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/cwmoss/emil-lib)[ Packagist](https://packagist.org/packages/cwmoss/emil-lib)[ RSS](/packages/cwmoss-emil-lib/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

emil
====

[](#emil)

templated based email

WIP - this is work in progress!

TODO
----

[](#todo)

- data flow for templates
- who can edit transports?
- bulk send
- mail headers/ mail address handling
- add more tests

quick start
-----------

[](#quick-start)

```
 composer install

```

Templates
---------

[](#templates)

Template Engine is [LightnCandy](https://github.com/zordius/lightncandy) -- handlebars for php

### Template Naming Conventions

[](#template-naming-conventions)

- Layout template names start with `__` (two underscores)
- Partials start with `_` (one underscore)
- Message template names start with a lowercase character
- Template files for the email html part end with `.html`
- Template files for the email text part end with `.txt`
- Image Names must end with either `.png` or `.jgp`. Only PNG + JPEG images are supported.
- Maximum allowed file size is 100KB

### Providing Template Data

[](#providing-template-data)

Template placeholder data can be provided in the following order -- highest priority first:

- via `send` request as json POST data
- via `txt` template as frontmatter data
- via `html` template as frontmatter data

All of this data can be used in templates. There are some special keys that are used for e-mail generation:

- `to` receipients address
- `from`, `cc`, `bcc`, `reply-to`, `subject`
- `subject` is the only value, that can contain simple templating: `-d '{"subject":"hallo {{name}}"}'`

```
# message template: hd_warning.txt
---
subject: our harddisc is full!
to: admin@acme.com
cc: paul@acme.com
category: maintenance
layout: default
---

it happend again. please empty trash.

```

```
# layout template: __default.txt
***
	{{> @partial-block }}
***

file under: {{category}}

```

Credits
-------

[](#credits)

- swiftmailer, sending emails
- zordius/lightncandy, handlebars implementation for php
- mnapoli/front-yaml, frontmatter parsing
- starter templates, salted by ..., simpleresponsive by leemunroe/responsive-html-email-template
- acme logo by [Mackenzie Child](http://acmelogos.com/)

#### dev

[](#dev)

?? "zordius/lightncandy": "dev-master",

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance57

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/cwmoss-emil-lib/health.svg)

```
[![Health](https://phpackages.com/badges/cwmoss-emil-lib/health.svg)](https://phpackages.com/packages/cwmoss-emil-lib)
```

PHPackages © 2026

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