Search by

eii / laravel-email-tester

amit-eiitech

Command-line email delivery tester for Laravel applications.

Package info

github.com/amit-eiitech/laravel-email-tester

pkg:composer/eii/laravel-email-tester

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.0 2026-10-13 08:12 UTC

This package is auto-updated.

Last update: 2026-10-13 08:13:14 UTC


README

Send a synchronous test email from the command line to verify that a Laravel application's mail delivery is working.

Requirements

  • PHP ^8.2
  • Laravel ^12 or ^13

Installation

Install the package using Composer:

composer require eii/laravel-email-tester

Laravel will discover the service provider automatically.

Configuration

Publish the package configuration:

php artisan vendor:publish --tag=mail-test-config

Available environment variables:

MAIL_TEST_TO=you@example.com
MAIL_TEST_FROM=no-reply@example.com
MAIL_TEST_SUBJECT="Mail delivery test"
MAIL_TEST_MAILER=smtp

If MAIL_TEST_TO is not set, the command falls back to MAIL_FROM_ADDRESS.

Usage

Send a test email:

php artisan mail:test

Send to a specific address:

php artisan mail:test --to=you@example.com

Show configuration details before sending:

php artisan mail:test --to=you@example.com --debug

Use a specific mailer:

php artisan mail:test --to=you@example.com --mailer=smtp

Custom subject and body:

php artisan mail:test --to=you@example.com --subject="Mail check" --body="This is a custom test"

Output

Successful delivery returns exit code 0.

Failed delivery returns exit code 1 and logs the error to Laravel's default log channel.

License

This package is open-sourced software licensed under the MIT license.