I have already set my email configuration on .env file but when i check from tinker is shows null value.
here is my env config
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=465
MAIL_USERNAME=c57xxxx07f1
MAIL_PASSWORD=44****02fae
MAIL_ENCRYPTION=tls
i cant send email any solution for this ??
Try to find your config/mail.php
And put your env key inside.
env('MAIL_HOST', 'smtp.mailgun.org')
First argument is your env key, second arg is the default value.
return [
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
...
And clear config cache:
php artisan config:clear
php artisan optimize