PHPackages                             myth/postal - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. myth/postal

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

myth/postal
===========

A modern CodeIgniter 4 email replacement library.

v1.0.0-beta.1(yesterday)20[4 issues](https://github.com/lonnieezell/postal/issues)MITPHPPHP ^8.2CI passing

Since Jun 5Pushed yesterdayCompare

[ Source](https://github.com/lonnieezell/postal)[ Packagist](https://packagist.org/packages/myth/postal)[ RSS](/packages/myth-postal/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (7)Versions (4)Used By (0)

Postal
======

[](#postal)

**A modern, driver-based email library for CodeIgniter 4.**

Postal replaces CodeIgniter 4's monolithic `Email` class with a clean transport-driver architecture: compose a message once and send it through SMTP, Sendmail, PHP `mail()`, Amazon SES, a log, or a failover chain — without changing your application code. It keeps the familiar CI4 email API working for a painless migration, and it's fully testable without ever sending a real message.

> **Status:** Public beta (`0.x`). The API is stable and ready for use; breaking changes before `1.0` will be rare and called out clearly in the changelog.

---

Documentation
-------------

[](#documentation)

**[lonnieezell.github.io/postal](https://lonnieezell.github.io/postal/)** — full reference, guides, and configuration options for every transport.

---

Why Postal?
-----------

[](#why-postal)

- **Driver-based transports** — swap how mail is delivered via config, not code.
- **Drop-in friendly** — existing `service('email')` calls keep working through a compatibility adapter.
- **Amazon SES** — deliver through SesV2 with SigV4 signing; no SMTP relay required.
- **DKIM signing** — sign outbound messages at the library level with a one-line config addition, no application code changes.
- **Failover chain** — wrap any number of mailers in a priority-ordered fallback so a provider outage doesn't drop mail.
- **Suppression lists &amp; unsubscribe** — bind your own suppression list to silently filter recipients before send, and auto-inject `List-Unsubscribe` headers.
- **Inline image embedding** — local paths and `data:` URIs in HTML are automatically rewritten to `cid:` attachments.
- **Zero required dependencies** — PHP standard extensions only. No database, no queue, no view renderer needed to send mail.
- **Built for testing** — a fake transport and expressive assertions let you verify mail in PHPUnit without touching the network.
- **Mailable classes** — reusable, class-based emails with browser preview support in development.

---

Requirements
------------

[](#requirements)

- PHP 8.2+
- CodeIgniter 4.7+
- Extensions: `ext-openssl`, `ext-mbstring`
- `ext-curl` + `aws/aws-sdk-php` for the Amazon SES transport (optional)

---

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

[](#installation)

```
composer require myth/postal
```

CodeIgniter auto-discovers the package — no manual wiring required.

```
php spark email:test you@example.com   # send a test message via the default transport
```

---

Quick Start
-----------

[](#quick-start)

### Compose and send

[](#compose-and-send)

```
