PHPackages                             molajo/email - 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. molajo/email

ActiveMolajo-package[Mail &amp; Notifications](/categories/mail)

molajo/email
============

Molajo Email: platform independent support with adapters for PHPMailer, SwiftMail, and native PHP mail

v0.4(12y ago)04411MITPHPPHP &gt;=5.4

Since Jan 3Pushed 10y ago4 watchersCompare

[ Source](https://github.com/Molajo/Email)[ Packagist](https://packagist.org/packages/molajo/email)[ Docs](http://github.com/Molajo/Email)[ RSS](/packages/molajo-email/feed)WikiDiscussions master Synced 2mo ago

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

======= Email Package
=====================

[](#email-package)

[![Build Status](https://camo.githubusercontent.com/ac3e2f807a3ea3031c1dbe36f1f84859b2658c13f1caa2801fdb54a8f6e20ded/68747470733a2f2f7472617669732d63692e6f72672f4d6f6c616a6f2f456d61696c2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Molajo/Email)

Email Services API for PHP applications enabling interaction with multiple Email types (ex., PHP Mail, PHP Mailer, Swiftmailer, etc.).

At a glance ...
---------------

[](#at-a-glance-)

1. Instantiate a Mail Handler.
2. Instantiate the Adapter, injecting it with the Handler.
3. Set mail parameters.
4. Send mail.

```
    // 1. Instantiate an Email Handler.
    $options                     = array();
    $options['mailer_transport'] = 'mail';
    $options['site_name']        = 'Sitename';
    $options['Fieldhandler']     = new Fieldhandler();

    $class   = 'Molajo\\Email\\Handler\\PhpMailer';
    $handler = new $class($options);

    // 2. Instantiate the Adapter, injecting it with the Handler.
    $class         = 'Molajo\\Email\\Adapter';
    $this->adapter = new $class($handler);

    // 3. Set email parameters
    $this->adapter->set('to', 'AmyStephen@Molajo.org,Fname Lname');
    $this->adapter->set('from', 'AmyStephen@Molajo.org,Fname Lname');
    $this->adapter->set('reply_to', 'AmyStephen@Molajo.org,FName LName');
    $this->adapter->set('cc', 'AmyStephen@Molajo.org,FName LName');
    $this->adapter->set('bcc', 'AmyStephen@Molajo.org,FName LName');
    $this->adapter->set('subject', 'Welcome to our Site');
    $this->adapter->set('body', 'Stuff goes here');
    $this->adapter->set('mailer_html_or_text', 'text');

    // 4. Send Email.
    $this->adapter->send();
```

Install using Composer from Packagist
-------------------------------------

[](#install-using-composer-from-packagist)

### Step 1: Install composer in your project

[](#step-1-install-composer-in-your-project)

```
    curl -s https://getcomposer.org/installer | php
```

### Step 2: Create a **composer.json** file in your project root

[](#step-2-create-a-composerjson-file-in-your-project-root)

```
{
    "require": {
        "Molajo/Email": "1.*"
    }
}
```

### Step 3: Install via composer

[](#step-3-install-via-composer)

```
    php composer.phar install
```

Requirements and Compliance
---------------------------

[](#requirements-and-compliance)

- PHP framework independent, no dependencies
- Requires PHP 5.4, or above
- [Semantic Versioning](http://semver.org/)
- Compliant with:
    - [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) and [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) Namespacing
    - [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) Coding Standards
- \[phpDocumentor2\] ()
- \[phpUnit Testing\] ()
- Author [AmyStephen](http://twitter.com/AmyStephen)
- \[Travis Continuous Improvement\] ()
- Listed on \[Packagist\] () and installed using \[Composer\] ()
- Use github to submit [pull requests](https://github.com/Molajo/Email/pulls) and [features](https://github.com/Molajo/Email/issues)
- Licensed under the MIT License - see the `LICENSE` file for details

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

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

Every ~46 days

Total

3

Last Release

4421d ago

PHP version history (2 changes)v0.2PHP &gt;=5.3.10

v0.3PHP &gt;=5.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/95525?v=4)[AmyStephen](/maintainers/AmyStephen)[@AmyStephen](https://github.com/AmyStephen)

---

Top Contributors

[![AmyStephen](https://avatars.githubusercontent.com/u/95525?v=4)](https://github.com/AmyStephen "AmyStephen (50 commits)")

---

Tags

emailphpmailerMolajoSwiftmail

### Embed Badge

![Health badge](/badges/molajo-email/health.svg)

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

###  Alternatives

[itinerisltd/wp-phpmailer

WP PHPMailer provides a clean and simple way to configure WordPress-bundled PHPMailer library, allowing you to quickly get started sending mail through a local or cloud based service of your choice.

6231.6k](/packages/itinerisltd-wp-phpmailer)[ivantcholakov/codeigniter-phpmailer

A CodeIgniter 3 compatible email-library powered by PHPMailer.

25313.9k](/packages/ivantcholakov-codeigniter-phpmailer)[rmrevin/yii2-postman

Mail module for Yii2.

2612.3k](/packages/rmrevin-yii2-postman)[andrewdyer/slim3-mailer

Email support for the Slim Framework using Twig and Swift Mailer.

1032.7k](/packages/andrewdyer-slim3-mailer)

PHPackages © 2026

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