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
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
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;:
Hi Augustedotch DAH ,
The port you have mentioned is wrong there mail.port=465 instead of mail.port=25.
if you are using zimbra client then you need to use port 25.
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 ???
# 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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.