PHPackages                             programster/email-logger - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. programster/email-logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

programster/email-logger
========================

A logger that logs via email and is compatible with PSR-3

1.0.0(3y ago)04MITPHPPHP &gt;=8.1.0

Since Apr 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/programster/package-email-logger)[ Packagist](https://packagist.org/packages/programster/email-logger)[ Docs](https://github.com/programster/package-email-logger)[ RSS](/packages/programster-email-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Email Logger Package
====================

[](#email-logger-package)

A [PSR-3](https://www.php-fig.org/psr/psr-3/) logger for PHP that sends logs via email.

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

[](#installation)

```
composer require programster/email-logger
```

Example Usage
-------------

[](#example-usage)

```
# Create an emailer, in this case using PHPMailer.
# Any emailer that implements the EmailerInterface will work
$emailer = new Programster\Emailers\PhpMailerEmailer(
    "smtp.gmail.com",
    "someemail@gmail.com",
    "app-specific-password-goes-here",
    SecurityProtocol::TLS,
    "someemail@gmail.com",
    "Senders Name",
    587,
    "noreply@someemail.com",
    "noreply"
);

# Create the email logger
$logger = new EmailLogger(
    $emailer,
    "my-service-name-here",
    new EmailSubscriber("Jenn", "jenn@somdomain.com"),
    new EmailSubscriber("Roy", "roy@anotherdomain.com"),
);

# Create some useful context for the log that might help debugging/resolving what went wrong...
$context = [
    'some' => 'details'
];

# Send the log (email)
$logger->critical("There was a critical error!", $context);
```

Testing
-------

[](#testing)

When developing this package, please be sure to test, even if it's very basic. For now, one can test by removing the `.example` extension from the `settings.php.example` file, and filling it in. Then execute the `main.php` script to send emails to the subscribers specified in your settings.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

1119d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64a048ca8be761aced9419279975a21ef679b71c70d8263bc2fc413a87ad381c?d=identicon)[programster](/maintainers/programster)

---

Top Contributors

[![programster](https://avatars.githubusercontent.com/u/5709838?v=4)](https://github.com/programster "programster (6 commits)")

---

Tags

logloggingemail

### Embed Badge

![Health badge](/badges/programster-email-logger/health.svg)

```
[![Health](https://phpackages.com/badges/programster-email-logger/health.svg)](https://phpackages.com/packages/programster-email-logger)
```

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[league/tactician-logger

Adds PSR-3 logging support to the Tactician command bus

649.6M9](/packages/league-tactician-logger)[nelmio/js-logger-bundle

Adds logging of JS errors in your Symfony application

1761.2M](/packages/nelmio-js-logger-bundle)[saasscaleup/laravel-log-alarm

Laravel log Alarm help you to set up alarm when errors occur in your system and send you a notification via Slack and email

27025.0k](/packages/saasscaleup-laravel-log-alarm)[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2818.1k4](/packages/markrogoyski-simplelog-php)[filips123/monolog-phpmailer

PHPMailer handler for Monolog

1365.6k3](/packages/filips123-monolog-phpmailer)

PHPackages © 2026

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