PHPackages                             weluse/yii2-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. weluse/yii2-mailjet

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

weluse/yii2-mailjet
===================

Mailjet client

v0.2.0(6y ago)88.2k↓41.7%5[1 issues](https://github.com/weluse/yii2-mailjet/issues)[1 PRs](https://github.com/weluse/yii2-mailjet/pulls)MITPHP

Since Sep 15Pushed 5y ago5 watchersCompare

[ Source](https://github.com/weluse/yii2-mailjet)[ Packagist](https://packagist.org/packages/weluse/yii2-mailjet)[ RSS](/packages/weluse-yii2-mailjet/feed)WikiDiscussions master Synced 1mo ago

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

Mailjet Client
==============

[](#mailjet-client)

Create Mailjet Account
----------------------

[](#create-mailjet-account)

Install
-------

[](#install)

```
composer require weluse/yii2-mailjet

```

or add it to your composer.json in the require section

```
"weluse/yii2-mailjet": "*",

```

Setup
-----

[](#setup)

add/replace this in your config under the components key.

```
'components' => [
  'mailer' => [
    'class' => 'weluse\mailjet\Mailer',
    'apikey' => 'yourApiKey',
    'secret' => 'yourSecret',
  ],
],

```

Example
-------

[](#example)

```
Yii::$app->mailer->compose('signup', ['user' => $user])
->setTo($user->email)
->setFrom([Yii::$app->params['noReplyMailAddress'] => Yii::$app->name])
->setSubject('Signup success')
->send();

```

Attachment example
------------------

[](#attachment-example)

```
// Mail with attachment from string via Message::attachContent()
Yii::$app->mailer->compose('view-name')
->setSubject('Mail with attachment from content')
->attachContent("This is the attachment content", ['fileName' => 'attachment.txt', 'contentType' => 'text/plain'])
->setTo('info@example.com')
->send();

// Mail with attachment from file via Message::attach()
$filePath = ... // a file path here;
Yii::$app->mailer->compose('view-name')
->setSubject('Mail with attachment from content')
->attach($filePath)
->setTo('info@example.com')
->send();

```

Setup Event Tracking
--------------------

[](#setup-event-tracking)

Write the tracking item to the mailer config.

```
'components' => [
  'mailer' => [
    'class' => 'weluse\mailjet\Mailer',
    'apikey' => 'yourApiKey',
    'secret' => 'yourSecret',
    'tracking' => [
      'bounce' => 'http://yoururl.com/tracking?event=bounce',
    ],
  ],
],

```

To activate this url you must run this command at one time.

```
Yii::$app->mailer->activateTracking();

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~201 days

Recently: every ~248 days

Total

6

Last Release

2525d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da6b60e7a8942cb4a1ee2b643a77976a04ef339bebb1bcadff61d93c83b0debd?d=identicon)[weluse](/maintainers/weluse)

---

Top Contributors

[![Julian-B90](https://avatars.githubusercontent.com/u/4377396?v=4)](https://github.com/Julian-B90 "Julian-B90 (13 commits)")[![hdoddema](https://avatars.githubusercontent.com/u/15575132?v=4)](https://github.com/hdoddema "hdoddema (10 commits)")[![adrian-gallardo](https://avatars.githubusercontent.com/u/22297193?v=4)](https://github.com/adrian-gallardo "adrian-gallardo (1 commits)")[![Arnaud-G1](https://avatars.githubusercontent.com/u/8536657?v=4)](https://github.com/Arnaud-G1 "Arnaud-G1 (1 commits)")[![dbanck](https://avatars.githubusercontent.com/u/45985?v=4)](https://github.com/dbanck "dbanck (1 commits)")

---

Tags

mail-clientmailjetyii2yii2-extension

### Embed Badge

![Health badge](/badges/weluse-yii2-mailjet/health.svg)

```
[![Health](https://phpackages.com/badges/weluse-yii2-mailjet/health.svg)](https://phpackages.com/packages/weluse-yii2-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)
