Simple example with SMTP connector

Hi everyone,

I am quite new to Bonita. I have been trying to setup a connector for sending email from a Gmail account. I have read many tutorials which all seem quite straight forward and followed the same steps. However, after clicking the Test button, I keep getting the error message provided underneath.

From what I have found online, I understand that simply said there is some obstacle between Bonita and the Gmail server. I have tried this on two different and unrelated laptops, from two different internet accesses, turned off antivirus, allowed firewall access for Bonita and Java when requested, even created Yahoo account to test, if this was not related to the email service. There is no proxy and my Gmail and Yahoo accounts are enabled for the less secure apps. I even tried changing the Bonita’s Java version through preferences from the one which was installed together with Bonita to the one which was already installed on my computer (JRE 1.8.0_171) and allowed it through firewall, too. I am out of ideas.

Could someone please put a simple process with one task that has a working SMTP connector and share the bos file? I would put my email account details, but perhaps I am doing something wrong with the other parameters. Any other ideas are more than welcome, too!

Thanks in advance!

My connector settings:
SMTP Host: smtp.gmail.com
SMTP Port: 465
SSL checked
STARTTLS unchecked
Username: my full Gmail address
Password: the one which I use when logging into Gmail through browser
I have also tried pretty much all other variations with a Yahoo email and SMTP server address, port 587, SSL and STARTTLS both checked and unchecked.

Error message:
“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.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”

Hello,

The Email Connector uses Java Mail to execute. I worked many times with this connector in multiple contexts but never got such an SSL issue.

From what I read here , it is likely to be your firewall or anti-virus. Could you give a try on a not secured computer?

Thank you for the answer. Yes, indeed, apparently during many variations of testing I did not try disabling antivirus on one of the computers (I tried this just on another one). In Avast Free I disabled SSL connections scanning and now the connector works smoothly. Disabling SMTP scanning did the trick as well.

However, on another laptop disabling email scanning or the entire antivirus (Eset) did not work. Anyway, that must be some other computer or network security obstacles. I will need to check with the company’s IT on that.

Thanks once more!