javillafania
1 month ago
156
9
Laravel

Laravel Mail not using updated .env variables

Posted 1 month ago by javillafania

I have a helpdesk application that sends email notifications. On the production server, I initially set the following env variables to something like:

MAIL_USERNAME='[email protected]'

MAIL_FROM_ADDRESS='[email protected]'

I updated the env variables to something like:

MAIL_USERNAME='[email protected]'

MAIL_FROM_ADDRESS='[email protected]'

The system still uses the old values when sending emails. I tried to run the following:

php artisan config:clear

php artisan cache:clear

I also restarted the server several times.

When I use tinker, I get the correct values from the .env file.

Please sign in or create an account to participate in this conversation.