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

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

pushkar/easy-mail
=================

A wrapper for php's mail function that allows you to easily construct and send mails.

v1.5.4(6y ago)2772MITPHPPHP &gt;=7CI passing

Since Jun 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/pushkar-anand/easy-mail)[ Packagist](https://packagist.org/packages/pushkar/easy-mail)[ Docs](https://github.com/pushkar-anand/easy-mail)[ RSS](/packages/pushkar-easy-mail/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (1)Versions (22)Used By (0)

easy-mail
=========

[](#easy-mail)

A wrapper for php's mail function that allows you to easily construct and send mails.

- [Install](#install)
- [Usage](#usage)
- [License](#license)

Install
-------

[](#install)

With composer:

```
composer require pushkar/easy-mail
```

Usage
-----

[](#usage)

```
require_once "../../path/to/vendor/autoload.php";

use EasyMail\Mail;

//Example 1

$mail = new Mail("send_to@exapmle.com");
$mail->setSubject("Subject");
$mail->setMsg("Msg");
if($mail->sendMail()) {
    echo "Mail Sent.";
}

//Example 2

$mail = new Mail("send_to@exapmle.com", "Subject", "Msg');
if($mail->sendMail()) {
    echo "Mail Sent.";
}

//Some methods

//For a reply-to header
$mail->addReplyTo("email@email.com", Name);

//For html email
$mail->isHtml(true);

//For adding custom header
$mail->customHeaders($header);

//set From
$mail->setFrom($email, $name);

//All methods
isValidEmail(string);
isHtml(bool);
setSubject(string);
setMsg(string);
addCC(string);
addBcc(string);
customHeader(string);
addReplyTo(string, string|null);
setFrom(string, string|null);
setPriority(int);
addAttachment(string);
setEncoding(string);
sendMail();
```

License
-------

[](#license)

Copyright (c) 2018 [Pushkar Anand](https://pushkaranand.me/). Under MIT License.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 87.2% 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 ~34 days

Recently: every ~133 days

Total

20

Last Release

2247d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/57b9bfe4786ed56407a0a6ca136f2dc28098c59666f254a84b0369c096fbb878?d=identicon)[pushkar](/maintainers/pushkar)

---

Top Contributors

[![pushkar-anand](https://avatars.githubusercontent.com/u/13116715?v=4)](https://github.com/pushkar-anand "pushkar-anand (34 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![leblanc-simon](https://avatars.githubusercontent.com/u/605746?v=4)](https://github.com/leblanc-simon "leblanc-simon (1 commits)")[![manjutapali](https://avatars.githubusercontent.com/u/9125374?v=4)](https://github.com/manjutapali "manjutapali (1 commits)")[![simonardejr](https://avatars.githubusercontent.com/u/3685303?v=4)](https://github.com/simonardejr "simonardejr (1 commits)")[![SteveEdson](https://avatars.githubusercontent.com/u/1201960?v=4)](https://github.com/SteveEdson "SteveEdson (1 commits)")

---

Tags

mailphpSimplemailereasy

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[nette/mail

📧 Nette Mail: A handy library for creating and sending emails in PHP.

5389.8M246](/packages/nette-mail)[fedeisas/laravel-mail-css-inliner

Inline the CSS of your HTML emails using Laravel

5974.6M3](/packages/fedeisas-laravel-mail-css-inliner)[aplus/email

Aplus Framework Email Library

2461.6M3](/packages/aplus-email)[sylius/mailer-bundle

Mailers and e-mail template management for Symfony projects.

728.1M77](/packages/sylius-mailer-bundle)[voku/bounce-mail-handler

Bounce Mail Handler

49230.9k2](/packages/voku-bounce-mail-handler)[nickcv/yii2-mandrill

Mandrill Api Integration for Yii2

29554.2k2](/packages/nickcv-yii2-mandrill)

PHPackages © 2026

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