kuantiko/ci4-dummy-mailer

Provides a dummy protocol to the Email library for development — simulates sending without delivering

Maintainers

Package info

bitbucket.org/kuantiko/ci4-dummy-mailer

pkg:composer/kuantiko/ci4-dummy-mailer

Statistics

Installs: 23

Dependents: 0

Suggesters: 0

1.0.0 2026-06-18 12:12 UTC

This package is auto-updated.

Last update: 2026-06-18 12:25:37 UTC


README

Provides a dummy protocol to CodeIgniter 4's Email library for development — simulates sending without delivering any email.

Installation

composer require --dev kuantiko/ci4-dummy-mailer

CI4 4.4+ auto-discovers the package via Composer PSR-4. No manual registration needed.

Usage

Set the protocol in your .env file:

email.protocol = dummy

Any call to service('email')->send() will return true without sending. Useful for local development and CI pipelines where outgoing email must be suppressed.

How it works

  • DummyMailer extends CodeIgniter\Email\Email — full CI4 Email API is available
  • Overrides send() to return true immediately
  • A Services.php override routes protocol=dummy to DummyMailer via CI4's service factory
  • Activate per environment via .env — no code changes needed

Requirements

  • PHP 8.2+
  • CodeIgniter 4.4+