To get emails from hybris in local set up is something, we can not avoid. But not everybody has SMTP servers, so they are bound to use, some open source smtp servers, like that of gmail.
But google often blocks any attempt to sign in from any application (hybris), if it doesn’t know it. Basically this is a security feature from google. They don’t want a bad guy to access your account.
So what is the work around?
First, you need to set up the google account you are using, for a 2 step verification.
Once you click on get started, it will ask you for mobile number authentication using sms.
proceed to next stpes, after verification.
After clicking confirm on next screen, go to App specific password tab.
Generate a password for a custom application.
This will give you a 16 digit password, for your application. You need to use this password in your smtp settings. You can configure below proerties in local.properties file.
Now your email should work. You can test your email setting by sending a test email from HMC.