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

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

bounceshift/laravel
===================

Laravel adapter for the BounceShift email-validation SDK — facade, config, and a Deliverable validation rule.

v1.1.0(today)01↑2900%MITPHPPHP ^8.2CI passing

Since Jul 1Pushed todayCompare

[ Source](https://github.com/bounceshift/laravel)[ Packagist](https://packagist.org/packages/bounceshift/laravel)[ Docs](https://bounceshift.com)[ RSS](/packages/bounceshift-laravel/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (3)Used By (0)

BounceShift for Laravel
=======================

[](#bounceshift-for-laravel)

Laravel adapter for the [BounceShift](https://bounceshift.com) email-validation SDK. It wires the framework-agnostic [`bounceshift/bounceshift-php`](https://github.com/bounceshift/bounceshift-php) client into the container, adds a `BounceShift` facade, and ships a `Deliverable` validation rule for forms and requests.

- API reference:

Requirements
------------

[](#requirements)

- PHP `^8.2`
- Laravel `^11.0 | ^12.0 | ^13.0`

Installation
------------

[](#installation)

```
composer require bounceshift/laravel
```

The service provider and `BounceShift` facade are auto-discovered.

Publish the config file (optional):

```
php artisan vendor:publish --tag=bounceshift-config
```

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

[](#configuration)

Set your credentials in `.env`:

```
BOUNCESHIFT_API_KEY=your-api-key
BOUNCESHIFT_ORGANIZATION_ID=your-organization-id

# Optional
BOUNCESHIFT_BASE_URL=https://api.bounceshift.com/v1
BOUNCESHIFT_TIMEOUT=10
BOUNCESHIFT_RETRIES=2
```

Both `BOUNCESHIFT_API_KEY` and `BOUNCESHIFT_ORGANIZATION_ID` are required.

The published `config/bounceshift.php`:

```
return [
    'key' => env('BOUNCESHIFT_API_KEY'),
    'organization_id' => env('BOUNCESHIFT_ORGANIZATION_ID'),
    'base_url' => env('BOUNCESHIFT_BASE_URL', \BounceShift\Client::DEFAULT_BASE_URL),
    'timeout' => (int) env('BOUNCESHIFT_TIMEOUT', 10),
    'retries' => (int) env('BOUNCESHIFT_RETRIES', 2),
];
```

Quickstart
----------

[](#quickstart)

### Facade

[](#facade)

```
use BounceShift\Laravel\Facades\BounceShift;

$result = BounceShift::validate('user@example.com');

$result->status->value;   // 'valid', 'invalid', 'catch_all', ...
$result->confidence;      // 0-100
$result->isSafeToSend();  // true for 'valid' or 'catch_all'
$result->fromCache;       // bool
$result->creditsUsed;     // int
```

You can also resolve the client directly from the container:

```
use BounceShift\Client;

$result = app(Client::class)->validate('user@example.com');
```

### The `Deliverable` validation rule

[](#the-deliverable-validation-rule)

Use `Deliverable` to block undeliverable addresses in form requests and validators:

```
use BounceShift\Laravel\Rules\Deliverable;

$request->validate([
    'email' => ['required', 'email', new Deliverable],
]);
```

**Default (lenient) policy** — it never blocks on uncertainty:

StatusResult`invalid`, `disposable`, `do_not_mail`, `abuse`, `spamtrap`❌ fails`valid`, `catch_all`, `unknown`, `risky`✅ passesIf the API is unreachable (network/API outage), the rule **fails open** and passes, so an outage never blocks your users.

Warning

**`strict()` and `minConfidence()` can reject real users.** On infrastructure where the SMTP probe is throttled — common for **Outlook/Hotmail and Gmail** — legitimate, deliverable addresses often come back as `unknown` with low confidence. That is a probe limitation, *not* a quality signal. For public signup forms, prefer the **lenient default**, which never blocks on uncertainty. Only reach for strict mode or a confidence floor when you know your `unknown` rate is low and you would rather lose a few real addresses than accept any risk.

### Strict mode

[](#strict-mode)

`->strict()` additionally rejects the uncertain `risky` and `unknown` statuses (see the warning above):

```
$request->validate([
    'email' => ['required', 'email', (new Deliverable)->strict()],
]);
```

### Confidence threshold

[](#confidence-threshold)

`->minConfidence(int)` rejects any result scoring below the given threshold (0–100), on top of the always-rejected statuses. It is a graded alternative to `strict()`:

```
$request->validate([
    'email' => ['required', 'email', (new Deliverable)->minConfidence(70)],
]);
```

Because throttled probes return low-confidence `unknown` for real addresses, treat this exactly like `strict()` — see the warning above. It can be combined with `strict()`.

### Custom message

[](#custom-message)

```
(new Deliverable)->message('Please use a real, reachable email address.');

// or in strict mode
(new Deliverable)->strict()->message('That email cannot receive mail.');
```

Local development
-----------------

[](#local-development)

This package consumes the core SDK from a sibling directory via a Composer `path` repository:

```
your-workspace/
├── bounceshift-php/       # bounceshift/bounceshift-php (core)
└── bounceshift-laravel/   # this package

```

```
composer install
composer test
```

Testing
-------

[](#testing)

```
composer test
```

Tests run against `orchestra/testbench` with a stubbed client — no network access is required.

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8091592?v=4)[Hussam Abd](/maintainers/Hussam3bd)[@Hussam3bd](https://github.com/Hussam3bd)

---

Top Contributors

[![Hussam3bd](https://avatars.githubusercontent.com/u/8091592?v=4)](https://github.com/Hussam3bd "Hussam3bd (2 commits)")

---

Tags

laravelsdkemailemail validationemail-verificationdeliverabilityvalidation rulebounceshift

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M293](/packages/laravel-horizon)[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.4k](/packages/illuminate-database)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M183](/packages/laravel-ai)

PHPackages © 2026

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