Looking to hire Laravel developers? Try LaraJobs

laravel-email-tester maintained by eii

Description
Command-line email delivery tester for Laravel applications.
Last update
2026/10/13 10:12 (dev-main)
License
Links
Downloads
11

Comments
comments powered by Disqus

Laravel Email Tester

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

Requirements

  • PHP ^8.3
  • Laravel ^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.