Error received when sending email invite

cancel
Showing results for 
Search instead for 
Did you mean: 
marius_dumitrac
Active Member II

Error received when sending email invite

Jump to solution

Hi,

I need help with the following error when sending email invite to site users in Alfresco CE 5.0.d:

2018-09-15 00:00:03,969 ERROR [action.executer.MailActionExecuter] [FeedNotifier1] Failed to send email to user@domain.com : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not convert socket to TLS;
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. Failed messages: javax.mail.MessagingException: Could not convert socket to TLS;
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; message exceptions (1) are:
Failed message 1: javax.mail.MessagingException: Could not convert socket to TLS;
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

My email settings in alfresco-global.properties file are:

### Outbound email settings
mail.host=mail.domain.com
mail.port=587
mail.username=alfresco
mail.password=password
mail.protocol=smtp
mail.smtp.starttls.enable=true
mail.smtp.auth=true
mail.from.enabled=false
mail.from.default=alfresco@domain.com

Thanks,

Marius

1 Solution

Accepted Solutions
marius_dumitrac
Active Member II

Re: Error received when sending email invite

Jump to solution

Hi Rahul,

Change the mail settings to point to gmail will not work in my case, as we use a local email server.

However, the problem was solved, my bad - the sysadmin renewed the mail server certificate and all I had to do was to import the new trust chain in the keystore.

I leave here the steps that need to be done.

1. Get the trust chain from the certificate provider and save the certificates on the server.

2. import the certificates into the java keystore * using the following command (for each certificate)

<JAVA_HOME>/keytool -import -alias <aliasname> -keystore /path/to/keystore -file /path/to/certificate

Provide the password to the keystore and that's it!

* default location is <JAVA_HOME>/jre/lib/security/cacerts

Here is a little help on how to use keytool - The Most Common Java Keytool Keystore Commands 

View solution in original post

2 Replies
rahuld
Active Member II

Re: Error received when sending email invite

Jump to solution

Can you try out these below-mentioned configurations in the alfresco-global property file for Gmail?

# Sample OutBound Gmail settings
mail.host=smtp.gmail.com
mail.port=465
mail.username=*********@gmail.com
mail.password=*******

mail.protocol=smtps
mail.smtps.starttls.enable=true
mail.smtps.auth=true

Make sure you enable all the properties in the email setting like forwarding and POP/IMAP and allow the less secure apps.

Account settings: Allow Less Secure Apps

If not working please switch the ports from 465 to 587.

/external-link.jspa?url=https%3A%2F%2Fsupport.google.com%2Faccounts%2Fanswer%2F6010255

marius_dumitrac
Active Member II

Re: Error received when sending email invite

Jump to solution

Hi Rahul,

Change the mail settings to point to gmail will not work in my case, as we use a local email server.

However, the problem was solved, my bad - the sysadmin renewed the mail server certificate and all I had to do was to import the new trust chain in the keystore.

I leave here the steps that need to be done.

1. Get the trust chain from the certificate provider and save the certificates on the server.

2. import the certificates into the java keystore * using the following command (for each certificate)

<JAVA_HOME>/keytool -import -alias <aliasname> -keystore /path/to/keystore -file /path/to/certificate

Provide the password to the keystore and that's it!

* default location is <JAVA_HOME>/jre/lib/security/cacerts

Here is a little help on how to use keytool - The Most Common Java Keytool Keystore Commands