I need to send an email via the mail() PHP function.
I\'ve read somewhere that I have to change driver parameter in config/mail.php to
You can set your mail configuration .env file like
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=youremail@gmail.com
MAIL_PASSWORD="password"
MAIL_ENCRYPTION=tls
also set configuration in config/mail.php like:
'from' => ['address' => 'youremail@gmail.com', 'name' => 'Test'],
then you can clear the cache:
php artisan cache:clear
php artisan config:cache
php artisan cache:clear