PHPackages                             thebeaverhead/cakephp-bulk-notifications - 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. thebeaverhead/cakephp-bulk-notifications

ActiveCakephp-plugin[Mail &amp; Notifications](/categories/mail)

thebeaverhead/cakephp-bulk-notifications
========================================

Bulk notifications plugin for CakePHP

1.0.2(6y ago)185MITPHPPHP ^7.0CI failing

Since Jan 27Pushed 6y ago2 watchersCompare

[ Source](https://github.com/thebeaverhead/cakephp-bulk-notifications)[ Packagist](https://packagist.org/packages/thebeaverhead/cakephp-bulk-notifications)[ RSS](/packages/thebeaverhead-cakephp-bulk-notifications/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

CakePHP Bulk Notifications plugin
=================================

[](#cakephp-bulk-notifications-plugin)

Plugin lets you create bulk notifications. Lets imagine you send email notification to the topic's owner on new comment to the topic In case when user have 5 comments within one topic user will get 5 emails which is may be annoying.

This plugin allows to create an queue for such situation and sends one email with 5 new comments if between creating date of these comments no more than 30 seconds (configurable)

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

[](#installation)

```
composer require thebeaverhead/cakephp-bulk-notifications
```

Setup
-----

[](#setup)

In your app's console:

```
bin/cake plugin load BulkNotifications
```

Apply migration:

```
bin/cake migrations migrate -p BulkNotifications
```

Usage:
------

[](#usage)

To create an email to be sended (NOT increment):

```
$userEntity = TableRegistry::getTableLocator()->get('Users')->get($userId);
$topic = ['title' => 'foo'];
$comments = [
    ['text' => 'foo'],
    ['text' => 'bar']
];

$bulkNotification = new BulkNotification();
$bulkNotification->add(
    $userEntity,
    'Email subject',
    'email/template/path',
    ['topic' => $topic, 'comments' => $comments],
    ['sendDate' => 1580108540, 'receiverEmailColumn' => 'email']
);
```

To create increment email to be sended:

```
$userEntity = TableRegistry::getTableLocator()->get('Users')->get($userId);
$userEntity2 = TableRegistry::getTableLocator()->get('Users')->get($userId2);

$topic = ['title' => 'foo'];
$comments = [
    ['text' => 'foo'],
    ['text' => 'bar']
];

$bulkNotification = new BulkNotification();
$bulkNotification->addIncrement(
    [$userEntity, $userEntity2],
    'Email increment subject',
    'email/template/path',
    ['topic' => $topic],                    // not incremental data
    ['comments' => $comments],              // incremental data
    ['sendDate' => 1580108540, 'receiverEmailColumn' => 'email']
);

// Increment notification has been created
// in 10 sec new comment has been added to the same topic
sleep(10);
$comments = [
    ['text' => 'baz']
];

$bulkNotification->addIncrement(
    $userEntity,
    'Email increment subject',
    'email/template/path',
    ['topic' => $topic],                    // not incremental data
    ['comments' => $comments]               // incremental data
);
```

create email template.ctp

```

Hi , your topic  has new comment(s):

      Comment #

```

To send notifications run

```
bin/cake BulkNotifications run
```

Actually you need add this command to the crontab.

Configure:
----------

[](#configure)

Both methods `add` and `addIncrement` support `$options` parameter:

```
$options = [
 'sendDate' => 1580108540,         // (null by default) if this date isn't reached notification won't be sent
 'receiverEmailColumn' => 'email'  // (`email` by default) email column in the receiver entity
];
```

Shell BulkNotifications supports config `BulkNotifications.send_delay` in seconds (30sec by default) It won't sent an incremental email if previous notification has been created or updated less than 30 sec ago.

In config/app.php you can add:

```
'BulkNotifications' => [
  'send_delay' => 60
],
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

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

Every ~20 days

Total

3

Last Release

2259d ago

### Community

Maintainers

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

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thebeaverhead-cakephp-bulk-notifications/health.svg)

```
[![Health](https://phpackages.com/badges/thebeaverhead-cakephp-bulk-notifications/health.svg)](https://phpackages.com/packages/thebeaverhead-cakephp-bulk-notifications)
```

###  Alternatives

[lorenzo/cakephp-email-queue

Queue, preview and and send emails stored in the database

57121.5k1](/packages/lorenzo-cakephp-email-queue)[narendravaghela/cakephp-mailgun

Mailgun plugin for CakePHP - Send emails using Mailgun API

23356.6k](/packages/narendravaghela-cakephp-mailgun)[iandenh/cakephp-sendgrid

SendgridEmail plugin for CakePHP

16123.4k](/packages/iandenh-cakephp-sendgrid)[gourmet/email

Gourmet Email Plugin for rapid CakePHP application development.

175.2k](/packages/gourmet-email)

PHPackages © 2026

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