Skip to toolbar

Less secure App access | Gmail security configuration.

Gmail security configuration.

This gmail security setting is only be used when you are getting javax.mail.AuthenticationFailedException error in Java.

Google has an important security feature to protect your Gmail account from the other applications which seems insecure. By default, Google keeps this setting Off.

Note: Please ON this setting only if required for specific scenario. As it is not recommended by Google.

Some times you may get authentication issue while accessing any account from the application or device which uses less secure technology. In that case, you should receive the below email notification from the Google(Gmail) account.

Gmail security alert.

Change Gmail Security

Mostly, we receive this exception when we have to send email using the Java. Below are the steps to change the security level “Less secure App access” to ON.

  • Login to your Gmail account using the correct email id and password.
  • Click on the Profile picture present at the top-right corner on the page.
  • Click on “Manage your Google Account” option from the pop-up box.
Manage your google account pop-up.
  • Users will be redirected to the Google Account Page.
  • Click on the Security tab from the left side menu.
  • Scroll down the page to locate the “Less secure app access” section on the page.
  • Click on the link “Turn on access(not recommended)“.
Less secure app access tab.
  • By default, status is showing as OFF.
  • Now click on the toggle button to ON the access.
Security level set to Off.
  • Once the status is changed to “Allow less secure apps: ON”. You are good to proceed with your Java program.
  • Hopefully, you will not receive an authentication exception.

Leave a Reply

Your email address will not be published. Required fields are marked *

Site Statistics

  • Users online: 0 
  • Visitors today : 4
  • Page views today : 4
  • Total visitors : 49,318
  • Total page view: 67,889

   YouTube ChannelQuora

            Ashok Kumar is working in an IT Company as a QA Consultant. He has started his career as a Test Trainee in manual testing in August 2010. Then he moves towards the automation testing after 4 years. He started learning JAVA and Selenium by self to get the knowledge of automation.

       While learning these tools and working on multiple projects, he found that sometimes people get stuck in live scenarios in their project and they have to do lots of RnD to get out of it. So he decided to start blogging only for such scenarios, where anyone facing any problem in their project, can ask any question or give a solution or you can say an alternate solution to achieve the goal successfully.

Later on, he observed that some people want to learn Java but they have few questions in their mind like how to start Java, whether we should go for the online or offline course. So he started writing tutorials on Java, Jira, Selenium, Excel etc.