I am using laravel 5.2, And the using Swift Mailer for password resetting. I have 2-step verification on my gmail..
As the google help says :
In laravel, I was also having the same issue but is because of... I was not using "use clause" in the Mail function .
The error got solved after using "use clause".