Reputation: 131
I study Auth via Email verify in Laravel project. I'm having problem.
I used this gentleman's code. This is working perfectly.
https://github.com/SzaszSzilard/Laravel6Test
I could get "Please click the button below to verify your email address." mail from [email protected] and mailgun.org setting. It took plently time to recive it to my registered email address(Gmail). I guess because it's example.com and unknown domain.
I have rental a server. so I changed [email protected] and mailgun.org to my rental server domain and Email address at [.env] and [config/mail.php]. After I changed them I couldn't get verify email and I got Expected response code 250 but got code "530", with message "530 5.7.0 Authentication required " error. I searched at web and changed many parameter [.env] and [config/mail.php]. but everytime I changed I got diffrenct error and I couldn't get verify Email address.
Could someone teach me how to solve this please?
.ENV
MAIL_DRIVER=smtp
MAIL_HOST=myhost.sakura.ne.jp
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
Laravel Framework is 6.18.13 and I'm usiing Let's Encrypt SSL.
UPDATE: I already did this
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
Upvotes: 0
Views: 3158
Reputation: 36
his error normally occurs when the laravel smtp driver cannot authenticate with the smtp server, and this can be caused by many things, many smtp servers block smtp ports, for example google, but from my experience it is normal for the settings to be wrong.
check that you are using the correct MAIL_ENCRYPTION and check with your smtp service provider that smtp ports have not been blocked for you
Upvotes: 2
Reputation: 592
Possible your config is not cached. You can run following command to get your app running.
php artisan config:cache
Upvotes: 0