PHPackages                             t4web/mail - 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. t4web/mail

ActiveZf2-module[Mail &amp; Notifications](/categories/mail)

t4web/mail
==========

ZF2 Module. Send mails, managing mail templates and mail log.

1.0.2(9y ago)156BSD-3-ClausePHPPHP &gt;=5.5

Since Sep 15Pushed 9y ago3 watchersCompare

[ Source](https://github.com/t4web/Mail)[ Packagist](https://packagist.org/packages/t4web/mail)[ Docs](https://github.com/t4web/Mail)[ RSS](/packages/t4web-mail/feed)WikiDiscussions master Synced 2mo ago

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

Mail
====

[](#mail)

[![Build Status](https://camo.githubusercontent.com/3467aff232976b8bdb8b6291f671fadbb7a397095ac275c5b5647e8f6a6faac1/68747470733a2f2f7472617669732d63692e6f72672f74347765622f4d61696c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/t4web/Mail)[![codecov.io](https://camo.githubusercontent.com/c67a232514947f760153a4c45972736a5238eee83ea84ce44d56c77366e3659f/687474703a2f2f636f6465636f762e696f2f6769746875622f74347765622f4d61696c2f636f7665726167652e7376673f6272616e63683d6d6173746572)](http://codecov.io/github/t4web/Mail?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/98945055d1acdd4ba746a7a8c263028d73bd41ec4644d0c46db9dd6200d42fe4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74347765622f4d61696c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/t4web/Mail/?branch=master)

ZF2 Module. Send mails, managing mail templates and mail log.

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

[](#installation)

### Main Setup

[](#main-setup)

#### By cloning project

[](#by-cloning-project)

Clone this project into your `./vendor/` directory.

#### With composer

[](#with-composer)

Add this project in your composer.json:

```
"require": {
    "t4web/mail": "~1.0.0"
}
```

Now tell composer to download `T4web\Mail` by running the command:

```
$ php composer.phar update

#### Post installation

Enabling it in your `application.config.php`file.

```php
 array(
        // ...
        'T4web\Mail',
    ),
    // ...
);
```

Configuring
-----------

[](#configuring)

For define mail templates, describe it in config:

```
't4web-mail' => [
    // Global for all mails
    'from-email' => 'support@your-domain.com',

    // Global for all mails
    'from-name' => 'Your project name',

    'templates' => [

        // Template id
        T4web\Mail\Template::FEEDBACK_ANSWER => [
            'subject' => 'Feedback answer',
            'template' => 't4web-mail/template/feedback-answer',
            'layout' => T4web\Mail\Template::LAYOUT_DEFAULT,
        ],
    ],

    'layout' => [

        // Layout id => layout template
        T4web\Mail\Template::LAYOUT_DEFAULT => 't4web-mail/layout/default',
    ],
],
```

Template may be like this [template/feedback-answer.phtml](https://github.com/t4web/Mail/blob/master/view/t4web-mail/template/feedback-answer.phtml)

Using
-----

[](#using)

```
$sender = $this->getServiceLocator()->get(\T4web\Mail\Sender::class);
$to = 'receiver@email.com';
$data = [
    'userName' => 'Max',
    'message' => 'My message',
    'answer' => 'My answer',
];
$sender->send($to, \T4web\Mail\Template::FEEDBACK_ANSWER, $data);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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 ~66 days

Total

3

Last Release

3397d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d6b9ab1c535f3a27bd3b2bb97bc7d43c611cb69731861d2c2d60e1174b27ec4?d=identicon)[maxgu](/maintainers/maxgu)

---

Top Contributors

[![maxgu](https://avatars.githubusercontent.com/u/208688?v=4)](https://github.com/maxgu "maxgu (12 commits)")

---

Tags

mailmodulezf2zf2 module

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/t4web-mail/health.svg)

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

###  Alternatives

[mtymek/mt-mail

Zend Framework e-mail module. Using this library can easily create e-mail messages from PHTML templates (with optional layouts) and send them using configurable transports. Pluggable, EventManager-driven architecture allows you to customize every aspect of the process.

1839.2k3](/packages/mtymek-mt-mail)[spoonx/sxmail

A simple mail module for Zend Framework 2.

1173.1k](/packages/spoonx-sxmail)[davidhavl/dherrorlogging

Full featured error logging module for ZF2/ZF3 application

1924.5k](/packages/davidhavl-dherrorlogging)[rwoverdijk/sxmail

A simple mail module for Zend Framework 2.

111.5k](/packages/rwoverdijk-sxmail)

PHPackages © 2026

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