PHPackages                             netcore/module-email - 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. netcore/module-email

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

netcore/module-email
====================

v1.0.6(7y ago)01.1k[1 issues](https://github.com/netcore/module-email/issues)PHPPHP &gt;=7.0.0

Since Dec 7Pushed 7y ago5 watchersCompare

[ Source](https://github.com/netcore/module-email)[ Packagist](https://packagist.org/packages/netcore/module-email)[ RSS](/packages/netcore-module-email/feed)WikiDiscussions master Synced 3w ago

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

Module - Email
--------------

[](#module---email)

This module was made for easy management of automated emails and email campaigns.

Pre-installation
----------------

[](#pre-installation)

This package is part of Netcore CMS ecosystem and is only functional in a project that has following packages installed:

1.
2.
3.
4.
5.

### Installation

[](#installation)

- Require this package using composer

```
    composer require netcore/module-email

```

- Publish assets/configuration/migrations

```
    php artisan module:publish Email
    php artisan module:publish-config Email
    php artisan module:publish-migration Email
    php artisan migrate

```

- Add automated emails command to scheduling in "app/Console/Kernel.php"

```
    $schedule->command('automated-emails:send')->everyMinute();

```

- Set queue driver to redis
- In your supervisor configuration set --timeout to 3600 or larger if a project will have large user base to send campaigns to
- Add `Modules\User\Traits\ReplaceableAttributes` trait to your `User` model and set public property `$replaceable` which you want dynamically use in email templates:

```
public $replaceable = [
    'first_name',
    'last_name',
    'email'
];

```

and set `$replaceablePrefix` to prefix the replaceable attributes.

- Add "getFilters" and "getFilterQuery" methods to User model, like so:

```
    public function getFilters()
    {
        return [
            'is_email_verified' => [
                'name'   => 'Email verified?',
                'type'   => 'select', // Available types: text, select, multi-select, from-to
                'values' => [-1 => 'Not important', 1 => 'Yes', 0 => 'No']
            ],
            'country'           => [
                'name'   => 'Country',
                'type'   => 'multi-select', // Available types: text, select, multi-select, from-to
                'values' => Country::all()->mapWithKeys(function ($country) {
                    return [
                        $country->id => $country->name
                    ];
                })
            ],
        ];
    }

    public function getFilterQuery()
    {
        $filters = request()->get('filters', []);
        $query = User::select('id', 'email');

        foreach ($this->getFilters() as $field => $filter) {
            $data = (isset($filters[$field])) ? $filters[$field] : -1;

            if ($data < 0) {
                continue;
            }

            if ($filter['type'] == 'multi-select') {
                $query->whereHas($field, function ($q) use ($data) {
                    $q->whereIn('id', $data);
                });
            } elseif ($filter['type'] == 'from-to') {

                if (($data['from'] && $data['to']) && $data['to'] > $data['from']) {
                    $query->whereBetween($field, [$data['from'], $data['to']]);
                }

            } else {
                $query->where($field, $data);
            }
        }

        return $query;
    }

```

### Configuration

[](#configuration)

- Configuration file is available at config/netcore/module-email.php

### Seeding automated emails

[](#seeding-automated-emails)

```
   use Modules\Email\Models\AutomatedEmail;
   use Netcore\Translator\Helpers\TransHelper;

   $emails = [
        [
            'key'          => 'verify_email',
            'period'       => 'now',
            'type'         => 'static', // Available types: static, period, interval
            'is_active'    => true,
            'translations' => [
                'name' => 'Email verification',
                'text' => 'Please verify your email by clicking on the link: [VERIFICATION_URL]'
            ]
        ]
    ];

    foreach ($emails as $email) {
        $emailModel = AutomatedEmail::create(array_except($email, 'translations'));

        $translations = [];
        foreach (TransHelper::getAllLanguages() as $language) {
            $translations[$language->iso_code] = $email['translations'];
        }

        $emailModel->updateTranslations($translations);
    }
```

### Usage

[](#usage)

- Add/remove email to/from subscriptions list

```
    email()->subscribe('example@example.com');
    email()->unsubscribe('example@example.com');
```

- Send automated email

```
    email()->send('verify_email', $user, [
        'VERIFICATION_URL' => $verificationUrl
    ]);
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 79.1% 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 ~29 days

Recently: every ~44 days

Total

8

Last Release

2919d ago

### Community

Maintainers

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

---

Top Contributors

[![dmitrijsmihailovs](https://avatars.githubusercontent.com/u/6555569?v=4)](https://github.com/dmitrijsmihailovs "dmitrijsmihailovs (34 commits)")[![gstvr](https://avatars.githubusercontent.com/u/13051632?v=4)](https://github.com/gstvr "gstvr (7 commits)")[![danielsGrietins](https://avatars.githubusercontent.com/u/24427373?v=4)](https://github.com/danielsGrietins "danielsGrietins (1 commits)")[![NViktors](https://avatars.githubusercontent.com/u/26169825?v=4)](https://github.com/NViktors "NViktors (1 commits)")

### Embed Badge

![Health badge](/badges/netcore-module-email/health.svg)

```
[![Health](https://phpackages.com/badges/netcore-module-email/health.svg)](https://phpackages.com/packages/netcore-module-email)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k169.0k9](/packages/bagisto-bagisto)[krayin/laravel-crm

Krayin CRM

23.2k33.4k1](/packages/krayin-laravel-crm)[unopim/unopim

UnoPim Laravel PIM

10.5k2.2k](/packages/unopim-unopim)[yajra/laravel-datatables-buttons

Laravel DataTables Buttons Plugin.

2629.8M58](/packages/yajra-laravel-datatables-buttons)[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[sebastienheyd/boilerplate

Laravel Boilerplate based on AdminLTE 3 with blade components, user management, roles, permissions, logs viewer, ...

29419.5k3](/packages/sebastienheyd-boilerplate)

PHPackages © 2026

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