PHPackages                             sciactive/umailphp - 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. sciactive/umailphp

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

sciactive/umailphp
==================

An email templating system for Nymph.

2.4.0(8y ago)240911Apache-2.0PHP

Since Jan 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sciactive/umailphp)[ Packagist](https://packagist.org/packages/sciactive/umailphp)[ Docs](http://umailphp.org/)[ RSS](/packages/sciactive-umailphp/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (1)Versions (14)Used By (1)

µMailPHP
========

[](#µmailphp)

An email templating system for Nymph.

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

[](#installation)

```
composer require sciactive/umailphp
npm install --save umailphp
```

uMailPHP is configured with the `\uMailPHP\Mail::configure()` static method. The configuration options are available in `conf/defaults.php`.

Usage
-----

[](#usage)

```
// After creating the \MyApp\VerifyEmailDefinition class, which extends
// \uMailPHP\Definition, you can use it like this:

// Define any macros, and be sure to escape them with htmlspecialchars.
$link = htmlspecialchars('https://example.com/userVerify?secret='.$someSecret);
$macros = [
  'verify_link' => $link,
  'start_date' => htmlspecialchars(\uMailPHP\Mail::formatDate(
      $user->startDate,
      'date_med',
      '',
      $user->timezone
  )),
  'to_phone' => htmlspecialchars(\uMailPHP\Mail::formatPhone($user->phone)),
  'to_group' => htmlspecialchars($user->group->name)
];
// Create the mail object. Second argument can either be an email address or an
// object with an 'email' property.
$mail = new \uMailPHP\Mail('\MyApp\VerifyEmailDefinition', $user, $macros);
// Send mail.
if (!$mail->send()) {
  throw new \Exception('Email failed.');
}
```

How It Works
------------

[](#how-it-works)

uMailPHP constructs emails using three parts:

- The template.
- The mail definition.
- An optional custom redefinition called a rendition.

The **template** is used for each email that is sent. It provides the basic layout of the email. If you don't specify a template when sending an email, the first one that is enabled will be used. If you haven't defined any templates, a default one will be used.

The **mail definition** is a PHP class responsible for initiating the email. It provides the main content of the email. For example, the mail definition of an email sent when a new user registers would pertain to the user and may have their information in the body of the email. The definition of an email sent when a user makes a purchase could provide information about the purchase and a receipt.

A **rendition** is stored in the database. When defined, it's used in place of the mail definition to construct the body of the email. It can be created through the setup GUI, rather than hard coded to customize the email's content.

How To Customize
----------------

[](#how-to-customize)

The two ways you can customize the emails are by creating templates and renditions. When you create a template, you can design the overall look and design of all emails. When you create a rendition, you can customize a single type of email (like a new user registration email).

Macros
------

[](#macros)

The content in an email almost always includes variables, such as the recipient's name, which are handled by macros. A macro is just the name of a variable surrounded by hash symbols (e.g. #to\_name#). This text is replaced before the email is sent.

There are universal macros, which can be used in any template, definition, or rendition. Also, there are macros specific to a mail definition. For example, the definition of an email sent when a user changes an appointment with a customer could have macros called #old\_date# and #new\_date#. When you create a rendition to customize the email, you can use these macros.

### Heads Up

[](#heads-up)

When you format a macro, edit the macro string as a whole. If you want to bold it, change the whole string, including the hash symbols.

- Right: **\#to\_name#**, *\#old\_date#*
- Wrong: #**to\_name**\#, #*old\_date*\#

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

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

Recently: every ~47 days

Total

13

Last Release

2974d ago

Major Versions

0.0.1 → 1.0.0-alpha.12015-03-24

1.1.0 → 2.0.02017-11-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/133c9c4eff1268723fc1be664b5312a40527c6a94bfd40215bf4ff276832738f?d=identicon)[hperrin](/maintainers/hperrin)

---

Top Contributors

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

---

Tags

emailemail-templatephpemailtemplating

### Embed Badge

![Health badge](/badges/sciactive-umailphp/health.svg)

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

###  Alternatives

[twig/twig

Twig, the flexible, fast, and secure template language for PHP

8.7k465.7M7.2k](/packages/twig-twig)[mustache/mustache

A Mustache implementation in PHP.

3.3k47.6M324](/packages/mustache-mustache)[smarty/smarty

Smarty - the compiling PHP template engine

2.4k41.8M457](/packages/smarty-smarty)[league/plates

Plates, the native PHP template system that's fast, easy to use and easy to extend.

1.5k6.2M273](/packages/league-plates)[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8379.7M105](/packages/eftec-bladeone)[lorenzo/pinky

A Foundation for Emails (Inky) template transpiler

29314.3M14](/packages/lorenzo-pinky)

PHPackages © 2026

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