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

ActiveLibrary

enlitepro/enlite-mail
=====================

The simple service for send mail with templates

v1.2.1(12y ago)0904MITPHPPHP &gt;=5.4.0

Since Aug 23Pushed 12y ago4 watchersCompare

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

READMEChangelogDependencies (2)Versions (11)Used By (0)

EnliteMail for ZendFramework2
=============================

[](#enlitemail-for-zendframework2)

The simple module send mail with templates for ZF2.

Install
=======

[](#install)

The recommended way to install is through composer.

```
{
    "require": {
        "enlitepro/enlite-mail": "~1.2.0"
    }
}
```

add `EnliteMail` to `modules` in `config/application.config.php`

Configure
=========

[](#configure)

The module use in default:

- For transport Zend\\Mail\\Transport\\Sendmail
- For renderer - default renderer

For use other writes in service locator, add to config:

```
array(
    'enlite_mail' => array(
        'renderer' => 'YOUR_RENDERER_FOR_MAIL', // default ViewRenderer
        'transport' => 'YOUR_TRANSPORT_FOR_MAIL', // default MailTransport
        'from_mail' => 'YOUR_MAIL',
        'from_name' => 'YOUR_NAME',
    )
)
```

For example:

```
array(
    'enlite_mail' => array(
        'renderer' => 'ZfcTwigRenderer',
        'transport' => 'MailTransport',
    )
)
```

For change transport you may set a new transport in key "MailTransport" for service\_manager. For example:

```
array(
    'service_manager' => array(
        'invokables' => array(
            'MailTransport' => 'Zend\Mail\Transport\Sendmail',
        ),
    )
);
```

Usage
=====

[](#usage)

```
use EnliteMail\Service;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorAwareTrait;

class MyService implements ServiceLocatorAwareInterface
{
    use ServiceLocatorAwareTrait,
        MailServiceTrait;

    public function test()
    {
        $mailService = $this->getMailService();

        // send any mail
        $message = $mailService->factoryMessage(); // this is Zend\Mail\Message
        // configure message
        // ...
        // send
        $mailService->sendMessage($message);

        // create mail from template and variables
        // variable will be pass to template
        $template = $mailService->createTemplate('my-module\controller\view', ['foo' => 'bar']);
        $mailService->sendTemplate($template, 'qwerty@example.com');
        // or, if you want operate message object before send
        $message = $mailService->createMessageFromTemplate($template);
        $mailService->sendMessage($message);
    }
}
```

Templates
---------

[](#templates)

Template system based on you renderer with all it benefits. There are only one new feature, headTitle plugin set message subject, not only page title.

example of **layout/mail.twig**

```
>

    {% block title %}
        {% do headTitle('My Application').setSeparator(' - ') %}
    {% endblock %}

{% block content %}{{ content|raw }}{% endblock content %}

```

example of **application/mail/invite.twig**

```
{% extends "layout/mail" %}

{% block content %}
    {% do headTitle("You're invited to MyApplication") %}

    Some variable: {{some_variable}}
{% endblock %}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 59.3% 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 ~12 days

Total

9

Last Release

4548d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.3

v1.1.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6265ea04a3505d2b2a5efefebf9ba98cad2e59c5ce8af931f23aca39be0af2a2?d=identicon)[Sysanin](/maintainers/Sysanin)

---

Top Contributors

[![Sysaninster](https://avatars.githubusercontent.com/u/3197583?v=4)](https://github.com/Sysaninster "Sysaninster (16 commits)")[![ftdebugger](https://avatars.githubusercontent.com/u/170282?v=4)](https://github.com/ftdebugger "ftdebugger (11 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/enlitepro-enlite-mail/health.svg)](https://phpackages.com/packages/enlitepro-enlite-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)[davidhavl/dherrorlogging

Full featured error logging module for ZF2/ZF3 application

1924.5k](/packages/davidhavl-dherrorlogging)[diamante/desk-application

DiamanteDesk Application

1221.9k](/packages/diamante-desk-application)[zucchi/zucchi

Zucchi Component Library for Zend Framework 2

121.5k1](/packages/zucchi-zucchi)[org_heigl/hybridauth

Lightweight Authentication Module for Zend-Framework 2 using the hybridauth-library

211.9k](/packages/org-heigl-hybridauth)

PHPackages © 2026

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