PHPackages                             duncan3dc/mailer - 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. duncan3dc/mailer

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

duncan3dc/mailer
================

A simple mailer abstraction with a clean interface

3.1.0(2mo ago)745.2k1[1 issues](https://github.com/duncan3dc/mailer/issues)Apache-2.0PHPPHP ^7.3 || ^8.0CI passing

Since May 31Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/duncan3dc/mailer)[ Packagist](https://packagist.org/packages/duncan3dc/mailer)[ Docs](https://github.com/duncan3dc/mailer)[ RSS](/packages/duncan3dc-mailer/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (10)Versions (19)Used By (0)

mailer
======

[](#mailer)

A simple mailer abstraction for PHP with a clean interface

Full documentation is available at
PHPDoc API documentation is also available at [https://duncan3dc.github.io/mailer/api/](https://duncan3dc.github.io/mailer/api/namespaces/duncan3dc.Mailer.html)

[![release](https://camo.githubusercontent.com/896de1bc1f7224b787050fbec5cd41dd8c2a0b47bb4bde0a37482767ae67b8e8/68747470733a2f2f706f7365722e707567782e6f72672f64756e63616e3364632f6d61696c65722f76657273696f6e2e737667)](https://packagist.org/packages/duncan3dc/mailer)[![build](https://github.com/duncan3dc/mailer/workflows/buildcheck/badge.svg?branch=main)](https://github.com/duncan3dc/mailer/actions?query=branch%3Amain+workflow%3Abuildcheck)[![coverage](https://camo.githubusercontent.com/f34765482656a5ff39f86a41ac397718f5afa0f46bf947f75167aff7e84ee68a/68747470733a2f2f636f6465636f762e696f2f67682f64756e63616e3364632f6d61696c65722f67726170682f62616467652e737667)](https://codecov.io/gh/duncan3dc/mailer)

Quick Example
-------------

[](#quick-example)

Send an email using the local mail server:

```
(new \duncan3dc\Mailer\Server)
    ->createMessage()
    ->withFromAddress("admin@example.com", "Administrator")
    ->withRecipient("user@example.com", "Your Name")
    ->withSubject("Test Email")
    ->withContent("Hello")
    ->withAttachment("/tmp/UGqucq", "sensible-filename.xls")
    ->send();
```

*Read more at *

Changelog
---------

[](#changelog)

A [Changelog](CHANGELOG.md) has been available since version 2.0.0

Where to get help
-----------------

[](#where-to-get-help)

Found a bug? Got a question? Just not sure how something works?
Please [create an issue](//github.com/duncan3dc/mailer/issues) and I'll do my best to help out.
Alternatively you can catch me on [Twitter](https://twitter.com/duncan3dc)

duncan3dc/mailer for enterprise
-------------------------------

[](#duncan3dcmailer-for-enterprise)

Available as part of the Tidelift Subscription

The maintainers of duncan3dc/mailer and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-duncan3dc-mailer?utm_source=packagist-duncan3dc-mailer&utm_medium=referral&utm_campaign=readme)

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance87

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 97.9% 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 ~292 days

Recently: every ~779 days

Total

16

Last Release

60d ago

Major Versions

1.5.1 → 2.0.02017-11-25

2.1.0 → 3.0.02025-02-04

PHP version history (5 changes)1.0.0PHP &gt;=5.4.0

1.4.0PHP &gt;=5.5.0

1.5.1PHP &gt;=5.6

2.0.0PHP ^7.0

2.1.0PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/11dc66042513f11d1c99b1e6763f25dca84a3ff31cdbea3972b9b804a3d3d5e9?d=identicon)[duncan3dc](/maintainers/duncan3dc)

---

Top Contributors

[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (92 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

emailphpemailmailersmtpsiwftmailer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/duncan3dc-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/duncan3dc-mailer/health.svg)](https://phpackages.com/packages/duncan3dc-mailer)
```

###  Alternatives

[aplus/email

Aplus Framework Email Library

2591.6M3](/packages/aplus-email)[illuminate/mail

The Illuminate Mail package.

5910.7M559](/packages/illuminate-mail)[swissup/module-email

Magento2 email providers integration (smtp, mandrill, amazon ses)

1513.8k2](/packages/swissup-module-email)

PHPackages © 2026

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