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 3w 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 41% 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

2311d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19229632?v=4)[Sergey Vasilets](/maintainers/octisfall)[@octisfall](https://github.com/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

[cakephp/debug_kit

CakePHP Debug Kit

86314.7M171](/packages/cakephp-debug-kit)[cakephp/bake

Bake plugin for CakePHP

11212.0M202](/packages/cakephp-bake)[dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

308954.9k25](/packages/dereuromark-cakephp-queue)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1882.3M44](/packages/dereuromark-cakephp-ide-helper)[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

3361.0M51](/packages/dereuromark-cakephp-tools)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131240.2k13](/packages/dereuromark-cakephp-tinyauth)

PHPackages © 2026

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