PHPackages                             shaqman/yii2-queue-mailer - 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. shaqman/yii2-queue-mailer

ActiveYii2-extension[Mail &amp; Notifications](/categories/mail)

shaqman/yii2-queue-mailer
=========================

Background mailer decorator for Yii2

0.3.0(8y ago)820.2k↓23.2%11MITPHP

Since Sep 20Pushed 8y ago3 watchersCompare

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

READMEChangelogDependencies (2)Versions (7)Used By (1)

shaqman/yii2-queue-mailer
=========================

[](#shaqmanyii2-queue-mailer)

Background mailer for Yii2 using any queue interface. This extension was tested with [yii2 queue extension](https://github.com/yiisoft/yii2-queue/).

This extension was tested only with [swiftmailer extension](http://www.yiiframework.com/doc-2.0/yii-swiftmailer-mailer.html), though it should work with any compatible mailer extension

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist shaqman/yii2-queue-mailer

```

or add

```
"shaqman/yii2-queue-mailer": "*"
```

Usage
-----

[](#usage)

Configure `queue` component of your application.

You can find the details here:

Configure `\shaqman\mailer\queuemailer\Mailer` as your primary mailer.

```
  'mailer' => [
      'class' => \shaqman\mailer\queuemailer\Mailer::class,
      'queue' => 'queue' // name of queue component, or a valid array configuration for it.
      'syncMailer' => [ // Any valid mailer should work
          'class' => 'yii\swiftmailer\Mailer',
          'useFileTransport' => true,
      ],
  ],

```

Now you can send your emails as usual.

```
$message = \Yii::$app->mailer->compose()
  ->setSubject('test subject')
  ->setFrom('test@example.org')
  ->setHtmlBody('test body')
  ->setTo('user@example.org')
  ->send($message);

```

One small difference should be noted compared to the default `send`. It now returns an `int` identifying the queue id that the mail was assigned to. This is to be expected since there is no way to know whether the mail was successfully sent at the time of the command was executed.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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 ~43 days

Total

6

Last Release

2991d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1113851?v=4)[Syakur Rahman](/maintainers/shaqman)[@shaqman](https://github.com/shaqman)

---

Top Contributors

[![shaqman](https://avatars.githubusercontent.com/u/1113851?v=4)](https://github.com/shaqman "shaqman (18 commits)")[![metalagman](https://avatars.githubusercontent.com/u/1983796?v=4)](https://github.com/metalagman "metalagman (2 commits)")

---

Tags

queuemaileryii2background

### Embed Badge

![Health badge](/badges/shaqman-yii2-queue-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/shaqman-yii2-queue-mailer/health.svg)](https://phpackages.com/packages/shaqman-yii2-queue-mailer)
```

###  Alternatives

[nterms/yii2-mailqueue

Email queue component for yii2 that works with yii2-swiftmailer.

87129.2k2](/packages/nterms-yii2-mailqueue)[yarcode/yii2-queue-mailer

Queue mailer decorator for Yii2 framework

1019.1k](/packages/yarcode-yii2-queue-mailer)[nickcv/yii2-mandrill

Mandrill Api Integration for Yii2

29554.2k2](/packages/nickcv-yii2-mandrill)[yarcode/yii2-mailgun-mailer

Mailgun mailer implementation for Yii2

1576.0k](/packages/yarcode-yii2-mailgun-mailer)[rmrevin/yii2-postman

Mail module for Yii2.

2612.3k](/packages/rmrevin-yii2-postman)

PHPackages © 2026

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