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.0.1(1y ago)745.1k1[1 issues](https://github.com/duncan3dc/mailer/issues)Apache-2.0PHPPHP ^7.3 || ^8.0CI passing

Since May 31Pushed 10mo 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 today

READMEChangelogDependencies (5)Versions (17)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 [http://duncan3dc.github.io/mailer/api/](http://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/.github/workflows/buildcheck.yml/badge.svg?branch=main)](https://github.com/duncan3dc/mailer/actions/workflows/buildcheck.yml)[![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

45

—

FairBetter than 93% of packages

Maintenance49

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity76

Established project with proven stability

 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

Every ~280 days

Recently: every ~830 days

Total

15

Last Release

380d 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 (84 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

2471.6M3](/packages/aplus-email)[nette/mail

📧 Nette Mail: A handy library for creating and sending emails in PHP.

4909.7M224](/packages/nette-mail)[mageplaza/module-smtp

SMTP Extension for Magento 2 helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers

3105.8M7](/packages/mageplaza-module-smtp)[sylius/mailer-bundle

Mailers and e-mail template management for Symfony projects.

727.9M72](/packages/sylius-mailer-bundle)[hafael/azure-mailer-driver

Supercharge your Laravel or Symfony app with Microsoft Azure Communication Services (ACS)! Effortlessly add email, chat, voice, video, and telephony-over-IP for next-level communication. 🚀

14101.1k](/packages/hafael-azure-mailer-driver)[swissup/module-email

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

1412.6k1](/packages/swissup-module-email)

PHPackages © 2026

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