nexmailpro/laravel

Official Laravel integration for the NexMailPro email verification API.

Maintainers

Package info

github.com/gsoroar32/nexmailpro-laravel

pkg:composer/nexmailpro/laravel

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-07-02 12:16 UTC

This package is auto-updated.

Last update: 2026-07-02 12:18:48 UTC


README

Official Laravel integration for the NexMailPro email verification API.

This package depends on nexmailpro/php-sdk and adds Laravel-native configuration, a facade, dependency injection support, a validation rule, and an Artisan test command.

Requirements

  • PHP 8.2+
  • Laravel 10, 11, or 12

Installation

composer require nexmailpro/laravel

Laravel package discovery will register the service provider and facade automatically.

If you want to publish the config file:

php artisan vendor:publish --tag=nexmailpro-config

Configuration

Add your environment variables:

NEXMAILPRO_API_KEY=
NEXMAILPRO_BASE_URL=https://nexmailpro.com/api/v1
NEXMAILPRO_TIMEOUT=15

The published config file lives at config/nexmailpro.php.

Usage

Facade

use NexMailPro\Laravel\Facades\NexMailPro;

$response = NexMailPro::verifyEmail('test@gmail.com');

Dependency Injection

use NexMailPro\Laravel\NexMailProManager;

$manager = app(NexMailProManager::class);

$response = $manager->verifyEmail('test@gmail.com', [
    'source' => 'signup-form',
]);

Validation Rule

use NexMailPro\Laravel\Rules\NexMailProEmail;

$validated = validator(
    ['email' => 'test@gmail.com'],
    ['email' => ['required', 'email', new NexMailProEmail()]],
)->validate();

The rule passes valid responses by default. If you want to allow risky results too:

new NexMailProEmail(allowRisky: true)

Artisan Command

php artisan nexmailpro:test test@gmail.com

The command prints the JSON response returned by NexMailPro.

Testing

Install dependencies and run the package test suite:

composer install
composer test

License

MIT