PHPackages                             samcb/mailnotifier - 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. samcb/mailnotifier

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

samcb/mailnotifier
==================

Mail generates based on DB templates

013PHP

Since Jun 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/samcbdev/mailnotifier)[ Packagist](https://packagist.org/packages/samcb/mailnotifier)[ RSS](/packages/samcb-mailnotifier/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

mailnotifier
============

[](#mailnotifier)

Mail generates based on DB templates

1. In CMD type `"composer require samcb/mailnotifier"`.

To publish Config, Migration files run

2. `php artisan vendor:publish --tag=notifymail-config`
3. `php artisan vendor:publish --tag=notifymail-migrations`
4. Run `"php artisan migrate"`This will create a migration table based on your notifymail config. Table name can be changeable.

In Your Controller(Example code)

5. If you want to replaceable words in your template, words must be in curly pharses like `{{your-key-to-replace}}`.

Syntax to generate replace content:

**`$details = Notifymail::generate_mail('template_unique_id','content_replace_array','subject_replace_array');`**

**template\_unique\_id** - It's a unique key of your template table. **content\_replace\_array** - It's a replace of your content field. **subject\_replace\_array** - It's a replace of your subject field.

6. You can check which fields are be replaceable by following comment.

**`$chk_field = Notifymail::check_dynamic_fields(your-template-unique-id);`**

7. Replace array content must be the order of the `$chk_field`. And also all replaceable words must have alternative values. For example, In `$chk_field` have 5 replaceable variable you have to pass 5 alternative or your dynamic value. Otherwise it hits some error.

**Example:**

`$replace_array_content=array("nameoforg","usernameplain","urloflogin","usernamehere","newpassword","logoimg","phnnum","emailhere","faxno");`

`$replace_array_subject=array("register");`

`$details = Notifymail::generate_records('1',$replace_array_content,'');`

If you don't have/ want to replace subject or content, Leave them blank as above.

8. Above function generates your replaced content. If you want to send mail, you have some additional requirements.

**Example:**

`$details = Notifymail::generate_records('1',$replace_array_content,'');`

`$details['email'] = "mail-name@domain.com"; (Must be only one mail id)`

`$details['from_mail'] = "mail-name@domain.com"; (Must be only one mail id)`

`$details['cc_mail'] = "mail-name@domain.com"; (You can send multiple by comma seperated string)`

`$details['bcc_mail'] = ""; (You can send multiple by comma seperated string)`

`$details['attachment'] = ""; (Must be only one mail id)`

**`$sendmail=Notifymail::send_mail($details);`**

9. If you don't want to add CC, BCC, Attachment., leave them blank. array key must be present to avoid errors.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/84003420?v=4)[Sam](/maintainers/samcbdev)[@samcbdev](https://github.com/samcbdev)

---

Top Contributors

[![samcbdev](https://avatars.githubusercontent.com/u/84003420?v=4)](https://github.com/samcbdev "samcbdev (12 commits)")

### Embed Badge

![Health badge](/badges/samcb-mailnotifier/health.svg)

```
[![Health](https://phpackages.com/badges/samcb-mailnotifier/health.svg)](https://phpackages.com/packages/samcb-mailnotifier)
```

###  Alternatives

[maize-tech/laravel-email-domain-rule

Laravel Email Domain Rule

612.0k](/packages/maize-tech-laravel-email-domain-rule)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

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