Download the PHP package myth/postal without Composer

On this page you can find all versions of the php package myth/postal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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

lonnieezell.github.io/postal — full reference, guides, and configuration options for every transport.


Why Postal?


Requirements


Installation

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


Quick Start

Compose and send

send() returns a SendResult carrying success, the provider messageId, any error, and the raw provider response.

Send through a named transport

Mailable classes

For reusable, testable messages, extend Mailable:

Scaffold one with:

Backward-compatible API

Existing CodeIgniter email code keeps working unchanged via service('email'):


Transports

Transport Config name Available
SMTP smtp ✅
Sendmail sendmail ✅
PHP mail() mail ✅
Log log ✅
Null null ✅
Fake (testing) — ✅
Amazon SES ses ✅
Resend resend ✅
Failover failover ✅
DKIM signing (decorator) — ✅
Mailgun mailgun Planned
Postmark postmark Planned

Register your own transport by adding it to the $transports map in Config\Mailer.


Configuration

Run php spark publish to write app/Config/Mailer.php into your application — a Config\Mailer extending the package's config, which Postal resolves in preference to its own default. Transports are defined there as named mailers, with a $default chosen per environment:

See the full documentation for every transport's configuration reference, DKIM setup, SES credentials, and more.


Events

Postal fires events through CodeIgniter's Events system at each stage of the send pipeline:

Event Fired Cancellable
email.composing before defaults/suppression are applied No
email.sending just before the transport sends Yes
email.sent after a successful send No
email.failed after a failed send No
email.suppressed per recipient removed by a suppression list No

Returning false from an email.sending listener cancels the send. Event emission can be disabled with Config\Mailer::$fireEvents = false.


Testing

Swap in the fake transport and assert against what would have been sent — no network, no real mail:


Contributing

Contributions are welcome. The project ships with a full toolchain (PHPUnit, php-cs-fixer, PHPStan, Rector) runnable locally or in Docker:

Docker equivalents are available for every command by prefixing docker: (e.g. composer docker:test), and docker compose up starts a dev container with all required extensions. A pre-commit hook (installed on composer install) lints and auto-formats staged PHP files.

Please ensure composer ci passes and new behavior is covered by tests before submitting a pull request.


License

Released under the MIT License.


All versions of postal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
league/commonmark Version ^2.4
tijsverkoyen/css-to-inline-styles Version ^2.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package myth/postal contains the following files

Loading the files please wait ...