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

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

nf/mail
=======

Send a bunch of email with template

2.0.0(7y ago)012MITPHPPHP &gt;=5.6

Since May 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nf-theme/mail)[ Packagist](https://packagist.org/packages/nf/mail)[ RSS](/packages/nf-mail/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (11)Used By (0)

Send Email Kit
==============

[](#send-email-kit)

> It's an extension kit for our theme

### Installation

[](#installation)

```
composer require nf/mail
```

### Configuration

[](#configuration)

##### 1. Open `config/app.php` file and insert a below line:

[](#1-open-configappphp-file-and-insert-a-below-line)

```
"providers"  => [
    ... (Other Provider)
    \NF\Mail\EmailServiceProvider::class
],
```

##### 2. Insert and Update `wp-config.php` file:

[](#2-insert-and-update-wp-configphp-file)

```
define('SENDMAIL_DRIVER', 'wp_mail'); // api, wp_mail, mailchimp (updating). Default is wp_mail
```

- If `SENDMAIL_DRIVER` is `api`, insert 2 constants to `wp-config.php`:

```
define('EMAIL_USERNAME', '');
define('EMAIL_PASSWORD', '');
```

#### Choose type channel

[](#choose-type-channel)

> Login with admin account, click "Theme Configuration" and choose "For Send Email" tab

- Has 3 type:
    - Api
    - wp\_mail
    - mailchimp (updating ...)

##### Crazy Way: Send email with one or more

[](#crazy-way-send-email-with-one-or-more)

- Create Input data include more user
- Create Input param
- Get content html template file
- Use data to match with variables into html template
- Set info for an array Receivers
- And use send email function

**Example:**

****```
	$user_data = [
	    [
	        'email' => 'cus_email@gmail.com',
	        'name'  => 'Name 1'
	    ],
	    [
	        'email' => 'cus_email@gmail.com',
	        'name'  => 'Name 2'
	    ]
	];

	$config = [
		'apiuri'          => ''
	];
	$params = [
	    'variables_1' => 'value_1',
	    'variables_2' => 'value_2',
	];
	$subject = 'No subject';
	$app_id  = 1;
	$user_id = 1;

	$email_template = file_get_contents(PATH_FILE_HTML_TEMPLATE);

	$users = collect($user_data);
	$users = $users->map(function($item) use ($params, $subject, $app_id, $user_id){
	    $tmp_user = new \NF\Mail\Models\User();
	    $tmp_user->setName($item['name'])
	             ->setTo($item['email'])
	             ->setAppId($app_id)
	             ->setUserId($user_id)
	             ->setSubject($subject)
	             ->setParams($params);
	    return $tmp_user;
	});

	$email = new \NF\Mail\Email($config);
	$email->send($users, $email_template);
```**** > **Note - Options for Config**:

```
Expand Options:
- mail_host
- mail_port,
- mail_from,
- mail_name,
- mail_username,
- mail_password,
- mail_encryption

```

##### Last Mission:

[](#last-mission)

- Check receiver email

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 82.6% 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 ~23 days

Recently: every ~29 days

Total

9

Last Release

2720d ago

Major Versions

v1.0.7 → 2.0.02018-12-03

### Community

Maintainers

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

---

Top Contributors

[![k62bcntt](https://avatars.githubusercontent.com/u/12668807?v=4)](https://github.com/k62bcntt "k62bcntt (19 commits)")[![garungabc](https://avatars.githubusercontent.com/u/24909843?v=4)](https://github.com/garungabc "garungabc (3 commits)")[![nightfury-est](https://avatars.githubusercontent.com/u/20170474?v=4)](https://github.com/nightfury-est "nightfury-est (1 commits)")

### Embed Badge

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

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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