impossible de configurer l'envoie d'email Alfresco 5.2.1

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

impossible de configurer l'envoie d'email Alfresco 5.2.1

Bonjour à tous ! depuis un moment j'ai essayer de configurer l'envoie d'email sur Alfresco 5.2.1 mais toujours impossible de transmettre le mail au destinataire. 

Le log indique l'erreur suivante : 

Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1;

notification.email.siteinvite=true

voici la configuration correspondante

### Configuration email sortant Alfresco
mail.host=smtp.gmail.com
mail.port=465
mail.username=monmail@gmail.com
mail.password=monmdp
mail.encoding=UTF-8
mail.from.default=monmail@gmail.com
mail.protocol=smtp
mail.from.enabled=true

mail.smtp.timeout=130000
mail.smtp.starttls.enable=true
mail.smtp.auth=true

6 Replies
kranthi
Active Member II

Re: impossible de configurer l'envoie d'email Alfresco 5.2.1

Hi Augustedotch DAH ,

If in case your are using gmail,yahoo you need to use the SMTPS instead of SMTP.
Refer https://community.alfresco.com/docs/DOC-4799-outbound-e-mail-configuration 

dotch
Member II

Re: impossible de configurer l'envoie d'email Alfresco 5.2.1

Hi, thanks for the answer and sorry for the delay.

you right. And i just try to use this configuration but the result is an error again.

this is my new config:

### Configuration email sortant Alfresco.

### the 465 port gives me the same error message so i use the 25 port.


mail.host=smtp.gmail.com
mail.port=25
mail.username=monmail@gmail.com
mail.password=monpwd
mail.encoding=UTF-8
mail.protocol=smtps
mail.from.enabled=false
mail.smtps.starttls.enable=true
mail.smtps.auth=true

The log shows this error: 

nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?; message exceptions (1) areFailed message 1: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 25;:

kranthi
Active Member II

Re: impossible de configurer l'envoie d'email Alfresco 5.2.1

Hi Augustedotch DAH ,

The port you have mentioned is wrong there mail.port=465 instead of mail.port=25.
kranthi
Active Member II

Re: impossible de configurer l'envoie d'email Alfresco 5.2.1

if you are using zimbra client then you need to use port 25.

dotch
Member II

Re: impossible de configurer l'envoie d'email Alfresco 5.2.1

Hi Kkumar _

when I use that config :

### Configuration email sortant Alfresco
mail.host=smtp.gmail.com
mail.port=465
mail.username=monmail@gmail.com
mail.password=monpwd
mail.encoding=UTF-8
mail.from.default=monmail@gmail.com
mail.protocol=smtps
mail.from.enabled=true
mail.smtps.timeout=130000
mail.smtps.starttls.enable=true
mail.smtps.auth=true

the error log now show this :

2018-05-14 07:18:26,625 INFO [web.site.EditionInterceptor] [http-apr-8095-exec-2] Successfully retrieved license information from Alfresco.
2018-05-14 07:20:17,296 INFO [web.scripts.ImapServerStatus] [http-apr-8095-exec-6] Successfully retrieved IMAP server status from Alfresco: disabled
2018-05-14 07:21:33,333 ERROR [action.executer.MailActionExecuter] [http-apr-8095-exec-10] Failed to send email to monmail@gmail.com : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is 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. Failed messages: 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; message exceptions (1) are:
Failed message 1: 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

I really don't understand that error. are there a particular config to add ??? 

kranthi
Active Member II

Re: impossible de configurer l'envoie d'email Alfresco 5.2.1

# Sample Gmail settings
mail.host=smtp.gmail.com
mail.port=465
mail.username=user@gmail.com
mail.password=password
mail.protocol=smtps
mail.smtps.starttls.enable=true
mail.smtps.auth=true


changed alfresco-global.properties file like this.
Go through official documentation properly Outbound E-mail Configuration.