So here is how you can test e-mail configuration in Laravel simply with one line Tinker code:
bash
php artisan tinker --execute="eval( base64_decode('TWFpbDo6cmF3KCdIZWxsbyBXb3JsZCEnLCBmdW5jdGlvbigkbXNnKSB7JG1zZy0+dG8oJ2VtYWlsQGV4YW1wbGUuY29tJyktPnN1YmplY3QoJ1Rlc3QgRW1haWwnKTsgfSk7') );"
The script above actually running this following command:
php
Mail::raw(
'Hello World!',
function($msg) {
$msg->to('[email protected]')->subject('Test Email');
}
);
That's it!