1. Introduction

Taylor Otwell recently updated ses environment variables in config/services.php for Laravel 5.8.

ses config git difference Here you can find the corresponding commit.

After upgrading an application to Laravel 5.8 I wanted to double check if the email connection is still working. However, I didn’t want to write extra code and clutter my git repo just for this. Luckily, Tinker enables us to send emails directly from the terminal 🙌.

2. Just show me the code

Open a terminal in the environment you want to test:

php artisan tinker

Change test@example.com to your email address and copy & paste it into your Tinker/Psy Shell:

Mail::raw('Raw text email for testing purposes', function ($message) {
   $message->subject('Tinker Test Email')->to('test@example.com');
});