Below error occurs because it is not allowing Less secure apps to access gmail account from Bonitasoft.
Go to this link https://www.google.com/settings/security/lesssecureapps
then Turn On and check the email connector it should work.
smtp.gmail.com with port: 587 for TLS
s,tp.gmail.com with port: 465 for SSL
java.lang.reflect.InvocationTargetException
org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: USERNAME=install | org.bonitasoft.engine.core.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbsQ
534-5.7.14 I2LNZelqyk_nipe19hSoKOjuWtaoMs2cJGVVQF39biYh0CElEDbde5PRudBYKuwTGQ2Iy5
534-5.7.14 OPBwGQy91Ri1lK_VvZRrIGolAS5uPr4R8B7ZPPCAtCmymWWLoDFDehh3aJEPeCSIs2yXya
534-5.7.14 skCeQR1S0YlQVzOx2U9DzCqH3CFXx37191sfYgZOo1L_b-4R4shMCGMTiCoVmx7fYBIqnX
534-5.7.14 24Zc8Ek5ot0NsD_KfVyj35fRJ7TQI> Please log in via your web browser and
534-5.7.14 then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 z184sm8776811pfz.6 – gsmtp