欢迎各位兄弟 发布技术文章
这里的技术是共享的
Swift_TransportException(code: 530): Expected response code 250 but got code \"530\", with message \"530 5.7.1 Authentication required\r\n\" at /my/project/path/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383
I tried using mail
, sendmail
and smtp
drivers. However if I set config values directly via mail.php
inconfig
dir it seems to work fine.
Once I get back to .env
configuration it's the same problem again.
I tried outputting .env
and config
values in my templates - they all seem fine.
Any ideas what might be causing this?
正确答案
The problem was in queue:listener.
Spend a lot of time trying to figure out why my config is being replaced with a wrong one.
Finally killing the php artisan queue:listen
这话作用大 是用来查错的 看发邮件错在哪里
process and letting supervisor restart it solved everything.
Still not sure what was causing that. Maybe the .env was cached or something. Restarting the process did the trick.
来自 http://stackoverflow.com/questions/31603119/laravel-5-1-mailsend-env-configuration-doesnt-work