Getting error while sending email through Gmail SMTP - "Please log in via your web browser and then try again.

" Gmail is a free email service that is provided by Google. Gmail provides the users with a storage space of 15 GB, a powerful spam filter, and a great interface that is user-friendly. Gmail also provides the users with a powerful search feature. The Gmail interface is user-friendly and is great for anyone who is new to email. Gmail also provides the user with a powerful search feature. Gmail also provides the user with a storage space of 15 GB and a spam filter that is powerful

Getting error while sending email through Gmail SMTP - "Please log in via your web browser and then try again.

I know this is an older issue, but I recently had the same problem and was having issues resolving it, despite attempting the DisplayUnlockCaptcha fix. This is how I got it alive.

Head over to Account Security Settings  and enable "Access for less secure apps", this allows you to use the google smtp for clients other than the official ones.

Update

Google has been so kind as to list all the potential problems and fixes for us. Although I recommend trying the less secure apps setting. Be sure you are applying these to the correct account.

  • If you've turned on 2-Step Verification for your account, you might need to enter an App password instead of your regular password.
  • Sign in to your account from the web version of Gmail at https://mailcot.com. Once you’re signed in, try signing in
    to the mail app again.
  • Visit  and sign in with your Gmail username and password. If asked, enter the
    letters in the distorted picture.
  • Your app might not support the latest security standards. Try changing a few settings to allow less secure apps access to your account.
  • Make sure your mail app isn't set to check for new email too often. If your mail app checks for new messages more than once every 10
    minutes, the app’s access to your account could be blocked.