What version of laravel do you use and what names for variables are you using in your .env?
Problem with sending mail, credentials are not read from .env-file
I'm trying to send mail in my Laravel app. I have done everything according to the tutorials available, and I'm pretty sure everything should be right.
I am using Google's SMTP server, and have the correct settings in .env-file. But in my local Windows environment, the app will fail always with error "554 5.5.1 Error: no valid recipients".
When I pull my app to a Linux environment, I instead get another error "530-5.5.1 Authentication Required".
However, I found out that when I view the cache file "bootstrap/cache/config.php", the username and password fields are set to NULL. For some reason it won't read the from .env.
When I edit the cache-file and add the credentials, everything works fine. But it's not a good solution. If I run "php artisan config:cache" they are gone again.
So my question is, why they are not cached correctly? And also, it would be nice to get it working in my local Windows environment as well.
Please or to participate in this conversation.