0

I want to send e-mail notification after registration, I do all things according to the jhipster documentation about configuring e-mail:

mail:
    host: smtp.gmail.com
    port: 587
    username: *******@gmail.com
    password: *****
    protocol: smtp
    tls: true
    properties.mail.smtp:
        auth: true
        starttls.enable: true
        ssl.trust: smtp.gmail.com

According to another issue on stackoverflow I allow google account to connect with less secure apps, but still, I got exception about:

org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unable to convert connection to SSL (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: Unable to convert connection to SSL (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)

What should I do to solve this issue?

Thank you in advance.

Ice
  • 1,783
  • 4
  • 26
  • 52

1 Answers1

1

Perhaps you are sending the email from a server without SSL certificate?

Scar Coder
  • 387
  • 3
  • 7
  • Yes, I don't have the certificate. How to generate it? – Ice Jun 07 '17 at 14:20
  • 1
    Since you're using JHipster, I suggest you look at the link below: https://stackoverflow.com/questions/29522114/how-to-add-self-signed-ssl-certificate-to-jhipster-sample-app – Scar Coder Jun 08 '17 at 08:49