PHPackages                             phpmailer/apix-log-phpmailer - 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. phpmailer/apix-log-phpmailer

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

phpmailer/apix-log-phpmailer
============================

A PHPMailer logger for APIx Log

v2.0.0(8y ago)1025611BSD-3-ClausePHPPHP &gt;=5.5CI failing

Since Sep 11Pushed 8y ago5 watchersCompare

[ Source](https://github.com/PHPMailer/apix-log-phpmailer)[ Packagist](https://packagist.org/packages/phpmailer/apix-log-phpmailer)[ RSS](/packages/phpmailer-apix-log-phpmailer/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

PHPMailer logger for Apix Log
=============================

[](#phpmailer-logger-for-apix-log)

An extension for the [Apix/Log](https://github.com/frqnck/apix-log) PSR-3 logger that sends log messages via email using [PHPMailer](https://github.com/PHPMailer/PHPMailer).

The home repo is [on github](https://github.com/PHPMailer/apix-log-phpmailer), and the composer package is [on packagist](https://packagist.org/packages/phpmailer/apix-log-phpmailer).

Apix Log was written by Franck Cassedanne (@frqnck). This extension is by Marcus Bointon (@Synchro) and is published via the [PHPmailer organisation](https://github.com/PHPMailer) under the BSD license (though note that PHPMailer itself uses the LGPL).

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

[](#installation)

Install the logger via composer:

```
composer require phpmailer/apix-log-phpmailer

```

You require at least PHP 5.5.

Usage
-----

[](#usage)

Create an Apix PhpMailer Log instance, providing a pre-configured PHPMailer instance to the constructor. This instance will be used for all subsequent messages.

By default the logger sends an email for each individual log message received, which can be quite inefficient, so call `$logger->setDeferred(true)` to save up the log messages and send them all in one message on `__destruct`.

We suggest you enable exceptions in your PHPMailer instance (by passing `true` to the constructor) otherwise you may not be told about problems sending your log messages.

Example
-------

[](#example)

```
use PHPMailer\PHPMailer\PHPMailer;
// Create a PHPMailer instance with exceptions enabled
$mailer = new PHPMailer(true);
$mailer->addAddress('logs@example.com', 'Log Mailbox');
$mailer->setFrom('myapp@example.com', 'My App');
$mailer->isSMTP();
$mailer->SMTPAuth = true;
$mailer->Host = 'tls://mail.example.com:587';
$mailer->Username = 'user';
$mailer->Password = 'pass';
$mailer->isHTML(false);
$mailer->Subject = 'Error log';

$logger = new Apix\Logger\PhpMailer($mailer);
$logger->setDeferred(true);
$logger->info('Log me!');
$logger->error('Log me too!');
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% 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 ~361 days

Total

3

Last Release

3225d ago

Major Versions

v1.1.0 → v2.0.02017-09-04

PHP version history (2 changes)v1.0PHP &gt;=5.3

v2.0.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c71a4f3f1d1bd7b8343828de40b45e69f81220a0f13c7571a1cc99b4f311f7d?d=identicon)[phpmailer](/maintainers/phpmailer)

---

Top Contributors

[![Synchro](https://avatars.githubusercontent.com/u/81561?v=4)](https://github.com/Synchro "Synchro (8 commits)")[![frqnck](https://avatars.githubusercontent.com/u/479874?v=4)](https://github.com/frqnck "frqnck (2 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpmailer-apix-log-phpmailer/health.svg)

```
[![Health](https://phpackages.com/badges/phpmailer-apix-log-phpmailer/health.svg)](https://phpackages.com/packages/phpmailer-apix-log-phpmailer)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k13.0M218](/packages/simplesamlphp-simplesamlphp)[getkirby/cms

The Kirby core

1.5k584.8k474](/packages/getkirby-cms)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[filips123/monolog-phpmailer

PHPMailer handler for Monolog

1371.8k3](/packages/filips123-monolog-phpmailer)[sproutcms/cms

Enterprise content management and framework

242.5k4](/packages/sproutcms-cms)

PHPackages © 2026

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