Laravel 5.1 Mail :: send.env config not working
I have a queue job that needs to send emails. I am getting the error:
Swift_TransportException (Code: 530): expected response code 250, but received code "530 \", with the message "530 5.7.1 Authentication required \ r \ n \" when / my / project / path / vendor / swiftmailer / swiftmailer / lib /classes/Swift/Transport/AbstractSmtpTransport.php:383
I've tried using drivers mail
, sendmail
and smtp
. However, if I set config values ββdirectly via mail.php
in config
dir it works fine.
Once I get back to the configuration .env
, I repeat the same problem.
I tried to bring value .env
and config
in my templates - they all look normal.
Any ideas what might be causing this?
source to share
The problem was in the queue: the listener.
Spend a lot of time trying to figure out why my configuration is being replaced with the wrong one.
Finally, by killing the process php artisan queue:listen
and restarting the dispatcher, it solved everything.
Still not sure what caused it. Maybe .env was cached or something. Restarting the process did the trick.
source to share