Testing Mail in Laravel with a Single Tinker Command
LaravelTinkerMailTips
10/10/2025 | By Tom Kiernan
🧪 Step 1: Open Tinker
Run this in your project root:
php artisan tinker
✉️ Step 2: Send a Test Email
Mail::raw('This is a test email from Tinker.', function ($message) {
$message->to('you@example.com')->subject('Test Email');
});
That’s it! If your .env mail settings are correct, you should receive the email right away.
🧩 Tip for Local Development
If you’re working locally, tools like MailHog, Mailpit, or Laravel’s log mail driver make testing even easier:
MAIL_MAILER=log