PHPackages                             mikejestes/ornamental - 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. mikejestes/ornamental

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

mikejestes/ornamental
=====================

A library to send templated transactional emails, and easily test.

0.2.3(11y ago)91.4k1[1 issues](https://github.com/mikejestes/ornamental/issues)MITPHPPHP &gt;=5.3.0

Since Feb 7Pushed 11y ago3 watchersCompare

[ Source](https://github.com/mikejestes/ornamental)[ Packagist](https://packagist.org/packages/mikejestes/ornamental)[ Docs](https://github.com/mikejestes/ornamental)[ RSS](/packages/mikejestes-ornamental/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (5)Versions (17)Used By (0)

Ornamental
==========

[](#ornamental)

A library to send templated transactional emails. Plugins for your choice of template language and mail sending library. Configuration through YAML.

[![Build Status](https://camo.githubusercontent.com/e33fc47be7684071d60f4b07581190a49565486577b81f474c1f8ed000727f02/68747470733a2f2f7472617669732d63692e6f72672f6d696b656a65737465732f6f726e616d656e74616c2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mikejestes/ornamental)

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

[](#installation)

Add to your `composer.json` file:

```
"require": {
    "mikejestes/ornamental": "*"
}
```

Then download and run [composer](http://getcomposer.org/):

```
curl -s https://getcomposer.org/installer | php
php composer.phar install

```

Defining Messages
-----------------

[](#defining-messages)

Yaml files configure each email message type. The filename minus `.yaml` is the key when constructing a `\Ornamental\Message` object.

```
from: service@example.com
fromName: "{{ company }}"
to: "{{user.email}}"
subject: "Welcome to Ornamental, {{user.name}}"
layout: welcome
template: user_welcome
required:
    - user
```

Layouts
-------

[](#layouts)

Layout files can be used to separate themes. The body of each individual message is injected with the `body` variable, which should be unescaped in mustache (`{{{body}}}`).

Configuration
-------------

[](#configuration)

```
$setup = \Ornamental\Settings::getInstance();
$setup->templateDir = __DIR__ . '/templates/';
$setup->layoutDir = __DIR__ . '/layouts/';
$setup->messageDir = __DIR__ . '/messages/';

// optionally prefix emails with a string
$setup->subjectPrefix = '[test] ';

// set default variables across all messages
$setup->defaults = array(
    'website_url' => 'http://example.com/',
);

// add phpmailer sender
$phpmailer = new \Ornamental\Sender\Phpmailer();
$phpmailer->smtpHost = 'smtp.example.com';
$phpmailer->smtpUsername = 'root';
$phpmailer->smtpPassword = 'password';

$setup->addSender($phpmailer);

//  \Ornamental\Sender\Logger is a sender that logs to a PSR logger class
$setup->addSender(new \Ornamental\Sender\Logger($logger));
```

Usage
-----

[](#usage)

Data as passed to each template by setting properties on the `\Ornamental\Message` object:

```
$email = new \Ornamental\Message('user_welcome');
$email->user = array('name' => "Joe User");
$email->send();
```

Current Plugins
---------------

[](#current-plugins)

Templating:

- mustache (install `mustache/mustache` from composer)
- php

Mail Transport:

- phpmailer (install `phpmailer/phpmailer`)
- log file

Integration with unit tests
---------------------------

[](#integration-with-unit-tests)

Unit tests can inspect the send log:

```
$deliveries = \Ornamental\Deliveries::getInstance();
$this->assertEquals(2, count($deliveries->log));
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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

Recently: every ~67 days

Total

16

Last Release

4228d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48138?v=4)[Mike Estes](/maintainers/mikejestes)[@mikejestes](https://github.com/mikejestes)

---

Top Contributors

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

---

Tags

emailtemplate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mikejestes-ornamental/health.svg)

```
[![Health](https://phpackages.com/badges/mikejestes-ornamental/health.svg)](https://phpackages.com/packages/mikejestes-ornamental)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.8M212](/packages/simplesamlphp-simplesamlphp)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[getkirby/cms

The Kirby core

1.5k567.4k436](/packages/getkirby-cms)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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