PHPackages                             nasimail/laravel-client - 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. nasimail/laravel-client

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

nasimail/laravel-client
=======================

Laravel client package for NasiMail with API and Laravel Mail drivers.

00PHPCI failing

Since Jun 7Pushed 2d agoCompare

[ Source](https://github.com/Hostnasi-Technonologies/nasimail)[ Packagist](https://packagist.org/packages/nasimail/laravel-client)[ RSS](/packages/nasimail-laravel-client/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (7)DependenciesVersions (1)Used By (0)

NasiMail Laravel Client (Local Package)
=======================================

[](#nasimail-laravel-client-local-package)

[![Tests](https://github.com/Hostnasi-Technonologies/nasimail/actions/workflows/tests.yml/badge.svg)](https://github.com/Hostnasi-Technonologies/nasimail/actions/workflows/tests.yml)

This package provides a Laravel client with two delivery drivers:

- `api`: send messages to a NasiMail API instance via HTTP.
- `mail`: send using Laravel's mail transport (`MAIL_MAILER`, etc.).

Supported Laravel versions: 8.x to 12.x.

Note: the custom `MAIL_MAILER=nasimail` transport is available on Laravel 9+. On Laravel 8, use the package `api` or `mail` driver via `NasiMailClient`.

Docs
----

[](#docs)

- Changelog: `CHANGELOG.md`
- Wiki: `WIKI.md`

Testing
-------

[](#testing)

Run tests locally:

```
composer install
./vendor/bin/phpunit
```

CI validates Laravel 8 through 12 with a PHP/Laravel matrix:

- Laravel 8.83 on PHP 8.1
- Laravel 9.52 on PHP 8.1
- Laravel 10.48 on PHP 8.2
- Laravel 11.x on PHP 8.3
- Laravel 12.x on PHP 8.4

Install in this monorepo
------------------------

[](#install-in-this-monorepo)

1. Add a path repository in your app `composer.json`:

```
{
  "repositories": [
    {
      "type": "path",
      "url": "packages/nasimail",
      "options": { "symlink": true }
    }
  ]
}
```

2. Require the package:

```
composer require nasimail/laravel-client:*
```

3. Publish config:

```
php artisan vendor:publish --tag=nasimail-client-config
```

Config
------

[](#config)

Set in `.env`:

```
NASIMAIL_DRIVER=api
NASIMAIL_BASE_URL=https://nasimail.hostnasi.com
NASIMAIL_SECRET_KEY=sk_live_xxx
```

For Laravel mail transport mode:

```
NASIMAIL_DRIVER=mail
# optional override, otherwise uses your default Laravel mailer
NASIMAIL_MAILER=log
```

For custom transport mode via Laravel Mail:

```
MAIL_MAILER=nasimail
NASIMAIL_BASE_URL=https://nasimail.hostnasi.com
NASIMAIL_SECRET_KEY=sk_live_xxx
```

The package now registers a default `mail.mailers.nasimail` entry automatically. If your app overrides `config/mail.php`, you can add this explicitly:

```
'mailers' => [
  // ...
  'nasimail' => [
    'transport' => 'nasimail',
    'base_url' => env('NASIMAIL_BASE_URL'),
    'secret_key' => env('NASIMAIL_SECRET_KEY'),
    'timeout' => env('NASIMAIL_TIMEOUT', 10),
  ],
],
```

Usage
-----

[](#usage)

```
use NasiMail\Laravel\NasiMailClient;

$response = app(NasiMailClient::class)->send([
    'from' => 'hello@example.com',
    'to' => ['user@example.com'],
    'subject' => 'Hello',
    'text' => 'Hi there',
]);
```

Troubleshooting
---------------

[](#troubleshooting)

If you see `Mailer [nasimail] is not defined`:

1. Ensure the package service provider is loaded.
2. Ensure `.env` includes:

```
MAIL_MAILER=nasimail
NASIMAIL_BASE_URL=https://nasimail.hostnasi.com
NASIMAIL_SECRET_KEY=sk_live_xxx
```

3. Clear cached configuration:

```
php artisan config:clear
php artisan cache:clear
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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/8592847?v=4)[Emmanuel Paul Mnzava](/maintainers/dbrax)[@dbrax](https://github.com/dbrax)

---

Top Contributors

[![dbrax](https://avatars.githubusercontent.com/u/8592847?v=4)](https://github.com/dbrax "dbrax (11 commits)")

### Embed Badge

![Health badge](/badges/nasimail-laravel-client/health.svg)

```
[![Health](https://phpackages.com/badges/nasimail-laravel-client/health.svg)](https://phpackages.com/packages/nasimail-laravel-client)
```

###  Alternatives

[mattketmo/email-checker

Throwaway email detection library

2742.1M5](/packages/mattketmo-email-checker)[ifightcrime/bootstrap-growl

Pretty simple jQuery plugin that turns standard Bootstrap alerts into 'Growl-like' notifications.

80113.0k](/packages/ifightcrime-bootstrap-growl)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)[andheiberg/notify

A site notification package for laravel.

119.1k1](/packages/andheiberg-notify)

PHPackages © 2026

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