PHPackages                             lianhua/easy-mailjet - 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. lianhua/easy-mailjet

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

lianhua/easy-mailjet
====================

A simple library for sending email through mailjet service

1.0(6y ago)022[2 PRs](https://github.com/Nevermille/EasyMailjet/pulls)GPL-3.0PHPPHP &gt;=7.3

Since Mar 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Nevermille/EasyMailjet)[ Packagist](https://packagist.org/packages/lianhua/easy-mailjet)[ RSS](/packages/lianhua-easy-mailjet/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (5)Used By (0)

EasyMailjet
===========

[](#easymailjet)

[![Build Status](https://camo.githubusercontent.com/ed004d9d3dec1770c6f295cee38a399334d3e35a82d700ad0024ebfb8c22f8a8/68747470733a2f2f7472617669732d63692e636f6d2f4e657665726d696c6c652f456173794d61696c6a65742e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Nevermille/EasyMailjet) [![BCH compliance](https://camo.githubusercontent.com/645cabcefb73e917338910eb3ad9c1b19b6aa697fe9a7741b6f4cf953942d38b/68747470733a2f2f626574746572636f64656875622e636f6d2f656467652f62616467652f4e657665726d696c6c652f456173794d61696c6a65743f6272616e63683d6d6173746572)](https://bettercodehub.com/)

Overview
--------

[](#overview)

A simple PHP class for sending emails through Mailjet provider

Compatibility
-------------

[](#compatibility)

This library has been tested for PHP 7.3 and higher

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

[](#installation)

Just use composer in your project:

```
composer require lianhua/easy-mailjet

```

If you don't use composer, clone or download this repository, all you need is inside the src directory. You'll need [Lianhua Email](https://github.com/Nevermille/Email) and [Mailjet API PHP Wrapper](https://github.com/mailjet/mailjet-apiv3-php)

Usage
-----

[](#usage)

### Mailjet object

[](#mailjet-object)

In order to create maijet object, you'll need your api keys and give them to the constructor.

```
$mj = new EasyMailjet("Your key", "Your secret");
```

### Sending an email

[](#sending-an-email)

Create an object of type [Lianhua Email](https://github.com/Nevermille/Email) and give it to the function sendMail.

```
$mj->sendMail($email);
```

You'll get in return a boolean indicating if the email had been sent successfully or not.

### Get mailjet detailed response

[](#get-mailjet-detailed-response)

If you give a var as second parameter, you'll be able to get the response from mailjet (read [Mailjet Documentation](https://dev.mailjet.com/email/guides/) for further explanations)

```
$mj->sendMail($email, $res);
```

### Send with custom ids

[](#send-with-custom-ids)

You can give as third and fourth parameters a custom id for the campaign and the message.

```
$mj->sendMail($email, $res, "campaign_id", "message_id");
```

### Sandbox mode

[](#sandbox-mode)

You can disable the email delivering while getting a feedback from mailjet.

```
$mj->setSandbox(true);
```

### Deduplicate mode

[](#deduplicate-mode)

You can disable duplicate contacts in a campaign.

```
$mj->setDeduplicate(true);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

2242d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/38858480?v=4)[Camille Nevermind](/maintainers/Nevermille)[@nevermille](https://github.com/nevermille)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lianhua-easy-mailjet/health.svg)

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

###  Alternatives

[mailjet/mailjet-swiftmailer

A SwiftMailer transport implementation for Mailjet

261.2M9](/packages/mailjet-mailjet-swiftmailer)

PHPackages © 2026

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