PHPackages                             thebeaverhead/cakephp-email-cron - 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-email-cron

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

thebeaverhead/cakephp-email-cron
================================

Email cron plugin for CakePHP

1.0.4(4y ago)0277MITPHPPHP ^7.0CI failing

Since Mar 10Pushed 4y ago2 watchersCompare

[ Source](https://github.com/thebeaverhead/cakephp-email-cron)[ Packagist](https://packagist.org/packages/thebeaverhead/cakephp-email-cron)[ RSS](/packages/thebeaverhead-cakephp-email-cron/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (2)Versions (7)Used By (0)

CakePHP Email cron plugin
=========================

[](#cakephp-email-cron-plugin)

Plugin lets you create email cron notifications. Lets imagine you send email 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-email-cron
```

Setup
-----

[](#setup)

In your app's console:

```
bin/cake plugin load EmailCron
```

Apply migration:

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

Usage:
------

[](#usage)

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

```
$emailCron = new EmailCron();
$emailCron
    ->setTo('example@mail.com')
    ->setTemplate('email/template/path')
    ->setSubject('Email subject')
    ->setSendDate(1580108540)
    ->setData([
        'topic' => [
            'title' => 'foo'
        ],
        'comments' => [
            ['text' => 'foo'],
            ['text' => 'bar']
        ]
    ])
    ->add();
```

To create increment email to be sended:

```
$emailCron = new EmailCron();
$emailCron
    ->setTo('example@mail.com')
    ->setTemplate('email/template/path')
    ->setSubject('Email subject')
    ->setSendDate(1580108540)
    ->setData([
        'topic' => [
            'title' => 'foo'
        ],
    ])
    ->setIncrementData([
        'comments' => [
            ['text' => 'foo'],
            ['text' => 'bar']
        ]
    ])
    ->addIncrement();

// Increment notification has been created
// in 10 sec new comment has been added to the same topic
sleep(10);

$emailCron
    ->setIncrementData([
        'comments' => [
            ['text' => 'baz'],
        ]
    ])
    ->addIncrement();
```

create email template.ctp

```

Hi, your topic  has new comment(s):

      Comment #

```

#### To send emails run

[](#to-send-emails-run)

```
bin/cake EmailCron run
```

Actually you need add this command to the crontab.

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

[](#configure)

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

In config/app.php you can add:

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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 ~186 days

Total

5

Last Release

1508d ago

### Community

Maintainers

![](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 (5 commits)")[![piotrpoz](https://avatars.githubusercontent.com/u/5487682?v=4)](https://github.com/piotrpoz "piotrpoz (1 commits)")[![tbhsupport](https://avatars.githubusercontent.com/u/54681070?v=4)](https://github.com/tbhsupport "tbhsupport (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thebeaverhead-cakephp-email-cron/health.svg)

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

###  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)
