0

This is the first time to configure mail to send password reset. I checked less secured to be active. I am getting this error

Expected response code 250 but got code "530", with message "530 5.7.0 
Must issue a STARTTLS command first. g63sm30213782wme.11 - gsmtp"

here is my configuration

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=hmshafik10@gmail.com
MAIL_PASSWORD=***********
MAIL_ENCRYPTION=tls

Update Tried to use set mail data in config/mail.php. Now I am getting this error

Expected response code 250 but got code "530", with message "530-5.5.1 
Authentication Required. Learn more at 530 5.5.1 
https://support.google.com/mail/?p=WantAuthError u189sm6330267wmg.18 - gsmtp"
hosam.shafik
  • 119
  • 2
  • 6
  • Possible duplicate of [Laravel SwiftMailer : Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required](http://stackoverflow.com/questions/37469770/laravel-swiftmailer-expected-response-code-250-but-got-code-530-with-messag) – Ian Apr 07 '17 at 13:03
  • 1
    Possible duplicate of [Laravel 5: Sending Email](http://stackoverflow.com/questions/31378357/laravel-5-sending-email) – aleksejjj Apr 07 '17 at 13:05

1 Answers1

0

It could be also that you actually don't get those variables from .env file.

When editing .env file you must clear cache with

php artisan cache:clear 

and maybe the best thing would be to restart the app if you are running it with

php artisan serve

then stop it and rerun again

lewis4u
  • 14,256
  • 18
  • 107
  • 148