Mail Task + Notifications not working in APS

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2021 10:08 AM
Hello,
I am using Alfresco Process Services 1.11.1 Trial Version and have problems configuring the mail task. I already looked up similar questions in this forum, but unfortunately, I cannot solve my problem. I can neither receive mails via the mail task nor receive notifications to a user from the system.
My mail settings in the file activiti-app.properties are:
email.enabled=true
email.host=smtp.gmail.com
email.port=587
email.tls=true
email.useCredentials=true
email.username=mail@mail.com
email.password=mailpw
#
## The base url that will be used to create urls in emails.
email.base.url=http://localhost:8080/activiti-app
#
email.from.default=no-reply@activiti.alfresco.com
email.from.default.name=Activiti
email.feedback.default=activiti@alfresco.com
In the logs I get following erros after starting a simple mail task process (shortened due to character limit):
12:38:32 [http-nio-8080-exec-1] ERROR org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context org.activiti.engine.ActivitiException: Could not send e-mail in execution 25001 [...] Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469) at org.apache.commons.mail.Email.send(Email.java:1496) at org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior.execute(MailActivityBehavior.java:102) ... 207 common frames omitted Caused by: javax.mail.MessagingException: Could not convert socket to TLS at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2064) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:724) at javax.mail.Service.connect(Service.java:388) at javax.mail.Service.connect(Service.java:246) at javax.mail.Service.connect(Service.java:195) at javax.mail.Transport.send0(Transport.java:254) at javax.mail.Transport.send(Transport.java:124) at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459) ... 209 common frames omitted Caused by: 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 at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:598) at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:525) at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2059) ... 216 common frames omitted Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 227 common frames omitted Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 233 common frames omitted 12:38:32 [http-nio-8080-exec-1] ERROR com.activiti.rest.exception.RestExceptionHandlerAdvice - Internal error: org.activiti.engine.ActivitiException: Could not send e-mail in execution 25001 [...] Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469) at org.apache.commons.mail.Email.send(Email.java:1496) at org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior.execute(MailActivityBehavior.java:102) ... 207 common frames omitted Caused by: javax.mail.MessagingException: Could not convert socket to TLS at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2064) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:724) at javax.mail.Service.connect(Service.java:388) at javax.mail.Service.connect(Service.java:246) at javax.mail.Service.connect(Service.java:195) at javax.mail.Transport.send0(Transport.java:254) at javax.mail.Transport.send(Transport.java:124) at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459) ... 209 common frames omitted Caused by: 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 at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:598) at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:525) at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2059) ... 216 common frames omitted Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 227 common frames omitted Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 233 common frames omitted
Any help is really appreciated.
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2021 11:55 AM
Hi @shmalik
Can you check that you can send/receive email on this server outside of APS?
Cheers,
Problem solved? Click Accept as Solution!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2021 07:05 PM
Hi @EddieMay ,
thank you for your quick reply!
I configured two different test accounts (each with a different mail server) in Outlook. For both accounts send/receive worked well (IMAP and SMTP) but I had to use smtp STARTTLS with Port 587 or SSL/TLS with Port 465 in the Outlook setup. For everything else I received errors. Also, it needed the credentials for the smtp.
I do not know if there is a way in APS to explicitly use STARTTLS. I tried it in APS with the combination TLS with port 587 and SSL with port 465, without success.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2021 07:04 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 11:20 AM
Hi,
So if StartTLS is not supported on APS, how does one get outlook mail services to work?
Thanks.
