PHPackages                             preshetin/mail-sender - 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. preshetin/mail-sender

ActiveLibrary

preshetin/mail-sender
=====================

Mail block that sends email by template

1.1(8y ago)019PHP

Since Jul 26Pushed 8y agoCompare

[ Source](https://github.com/preshetin/mail-sender)[ Packagist](https://packagist.org/packages/preshetin/mail-sender)[ RSS](/packages/preshetin-mail-sender/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

mail-sender
===========

[](#mail-sender)

Mail block that sends email by template for Laravel 5.3 / Laraflock Dashboard

Install
-------

[](#install)

1. Require in composer:

```
composer require preshetin/mail-sender:dev-master

```

2. Then register in `config/app.php`

```
providers' => [
    ...
    Preshetin\MailSender\MailSenderServiceProvider::class,
];

```

3. Run migrations to create `mail_logs` &amp; `mail_templates` tables:

```
php artisan migrate

```

4. Add `MailableEntity` interface &amp; `MailSenderTrait` trait in any Eloquent model:

```
use Preshetin\MailSender\MailSenderTrait;
use Preshetin\MailSender\Model\MailableEntity;

class Order extends Model implements MailableEntity
{
    use MailSenderTrait;

    // ...
}

```

5. `MailableEntity` interface will require you to add a couple of methods:

This is where email sends TO:

```
public function getEmail()
{
    return $this->user->email;
}

```

And `getMailTemplateReplacements` which gets values for mail template variables:

```
public function getMailTemplateReplacements()
{
    return [
        '[ORDER_ID]' => $this->id,
        '[NAME]'     => $this->user->name,
        ...
    ];
}

```

That's it! Now you may insert Blade templates and get mail send functionality!

Usage
-----

[](#usage)

Add in blade templates:

```
@include('mail-sender::partials.mail', ['mailable_entity' => $order])

```

Also, you may add to your sidebar:

```
@include('mail-sender::partials.sidebar')

```

Configuration
-------------

[](#configuration)

You may `php artisan vendor:publish` config `mail-sender.php`. There you may ajust a view for emails:

```
'mail_view' => 'emails.your_custom_view',

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community3

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~0 days

Total

2

Last Release

3211d ago

### Community

---

Top Contributors

[![preshetin](https://avatars.githubusercontent.com/u/4620130?v=4)](https://github.com/preshetin "preshetin (8 commits)")

### Embed Badge

![Health badge](/badges/preshetin-mail-sender/health.svg)

```
[![Health](https://phpackages.com/badges/preshetin-mail-sender/health.svg)](https://phpackages.com/packages/preshetin-mail-sender)
```

PHPackages © 2026

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