PHPackages                             adt/single-recipient-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. adt/single-recipient-mailer

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

adt/single-recipient-mailer
===========================

Component modifies `Nette\\Mail\\Message` to send all the emails to one address. Sutaible for non production environments.

v5.1(3y ago)058.4k↓56.8%1MITPHPPHP ^7.4|^8.0

Since Sep 1Pushed 3y ago15 watchersCompare

[ Source](https://github.com/AppsDevTeam/single-recipient)[ Packagist](https://packagist.org/packages/adt/single-recipient-mailer)[ RSS](/packages/adt-single-recipient-mailer/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (1)Versions (14)Used By (1)

Single Recipient
----------------

[](#single-recipient)

Component modifies `Nette\Mail\Message` to send all the emails to one address. Suitable for non production environments.

Original *To*, *Cc* and *Bcc* email addresses are stored in the subject of the email (for example: `To: origTo@example.com; origTo2@example.com; Cc: origCc@example.com | My email subject`).

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

[](#installation)

```
$ composer require adt/single-recipient-mailer
```

Usage
-----

[](#usage)

### via trait

[](#via-trait)

Use `ADT\SingleRecipient\SingleRecipient` trait in your mailer and then use `applySingleRecipient` method to apply a single recipient logic to an original message.

```
namespace App\Model;

use ADT\SingleRecipient\SingleRecipient;
use \Nette\Mail\SendmailMailer;

class Mailer extends SendmailMailer
{
	use SingleRecipient;

	public function send(Message $mail): void
	{
		if ($this->singleRecipient) {
			$this->applySingleRecipient($mail, 'developers@myproject.com');
		}

		$this->send($mail);
	}
}
```

### via config

[](#via-config)

Register `ADT\SingleRecipient\SingleRecipientMailer` in your `config.neon` to use `@sendmailMailer` and redirect all emails to `developers@myProject.com`:

```
services:
	sendmailMailer:
		class: Nette\Mail\SendmailMailer
		autowired: no # this is important

	mail.mailer: \ADT\SingleRecipient\SingleRecipientMailer(@sendmailMailer, 'developers@myproject.com')
```

The `autowired: no` option is important because Nette DI container would not know which `\Nette\Mail\IMailer` to inject in your application.

### via inheritance

[](#via-inheritance)

You can also extend the class if you want to:

```
namespace App\Model;

use Nette\Mail\SendmailMailer;

class Mailer extends \ADT\SingleRecipient\SingleRecipientMailer
{
	public function __construct()
	{
		parent::__construct(new SendMailMailer, 'developers@myproject.com');
	}

	public function send(\Nette\Mail\Message $mail)
	{
		parent::send($mail); # do not forget to call this
	}
}
```

You can disable redirecting to single recipient by passing empty value (e.g. `NULL` or zero-length string).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~235 days

Total

13

Last Release

1133d ago

Major Versions

v1.0.2 → v2.02017-07-25

v2.0 → v3.02018-02-19

v3.2 → v4.02019-09-23

v4.1 → v5.02022-05-24

PHP version history (3 changes)v4.0PHP ^7.1

v4.1PHP ^7.1 | ^8.1

v5.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5575ff5b286a1982356d8ed7d8fc9f44385b44ef1108f34ac8c71b106d0c69ec?d=identicon)[michallohnisky](/maintainers/michallohnisky)

![](https://www.gravatar.com/avatar/b14b3ccdfe1f00a01596de650930f4dcb5de964af406a2cb7a9dafdf75decc6a?d=identicon)[appsdevteam](/maintainers/appsdevteam)

---

Top Contributors

[![thorewi](https://avatars.githubusercontent.com/u/605858?v=4)](https://github.com/thorewi "thorewi (8 commits)")[![michallohnisky](https://avatars.githubusercontent.com/u/4747059?v=4)](https://github.com/michallohnisky "michallohnisky (6 commits)")

### Embed Badge

![Health badge](/badges/adt-single-recipient-mailer/health.svg)

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

###  Alternatives

[contributte/mailing

Sending emails with pleasure and prepared templates.

17966.3k2](/packages/contributte-mailing)[dotblue/mandrill

OO wrapper above Mandrill API for sending e-mails

1576.7k1](/packages/dotblue-mandrill)

PHPackages © 2026

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