PHPackages                             struktal/struktal-phpmailer-wrapper - 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. struktal/struktal-phpmailer-wrapper

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

struktal/struktal-phpmailer-wrapper
===================================

PHP wrapper library to extract common settings for a PHPMailer object instance

1.0.0(10mo ago)01.6k↑276.9%[1 PRs](https://github.com/Struktal/struktal-phpmailer-wrapper/pulls)1LGPL-2.1-onlyPHPPHP &gt;=8.2.0CI passing

Since Aug 20Pushed 5mo agoCompare

[ Source](https://github.com/Struktal/struktal-phpmailer-wrapper)[ Packagist](https://packagist.org/packages/struktal/struktal-phpmailer-wrapper)[ RSS](/packages/struktal-struktal-phpmailer-wrapper/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (3)Used By (1)

Struktal-PHPMailer-Wrapper
==========================

[](#struktal-phpmailer-wrapper)

This is a PHP wrapper library to extract common settings for a [PHPMailer](https://github.com/PHPMailer/PHPMailer) object instance

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

[](#installation)

To install this library, include it in your project using Composer:

```
composer require struktal/struktal-phpmailer-wrapper
```

Usage
-----

[](#usage)

Before you can use this library, you need to customize a few parameters. You can do this in the startup of your application:

```
\struktal\MailWrapper\MailWrapper::setSetupFunction(function(\struktal\MailWrapper\MailWrapper $mailer) {
    // Set up the mailer instance here
});
```

Furthermore, you can specify to redirect all mails to a specific address instead of the real recipients for testing purposes:

```
\struktal\MailWrapper\MailWrapper::setRedirectAllMails(
    true,
    "email@domain.com" // The email address to redirect all mails to
);
```

Then, you can instantiate an instance of the `MailWrapper` class and use it just like a regular `PHPMailer` object for sending mails.

Dependencies
------------

[](#dependencies)

- **PHPMailer** - GitHub: [PHPMailer/PHPMailer](https://github.com/PHPMailer/PHPMailer), licensed under [LGPL-2.1 license](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE)

License
-------

[](#license)

This software is licensed under the LGPL-2.1 license. See the [LICENSE](LICENSE) file for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance63

Regular maintenance activity

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

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

317d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/49905418?v=4)[Jens Ostertag](/maintainers/JensOstertag)[@JensOstertag](https://github.com/JensOstertag)

---

Top Contributors

[![JensOstertag](https://avatars.githubusercontent.com/u/49905418?v=4)](https://github.com/JensOstertag "JensOstertag (1 commits)")

---

Tags

mail

### Embed Badge

![Health badge](/badges/struktal-struktal-phpmailer-wrapper/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[adrianorsouza/codeigniter-phpmailer

CodeIgniter Mail Plugin Powered by PHPMailer Library

102.3k](/packages/adrianorsouza-codeigniter-phpmailer)

PHPackages © 2026

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