Page 1 of 1

Mail doesn't work

Posted: 28 Jun 2018, 14:21
by HTCraft
I'm developing an extension for Unity3D.
I try use SignUpController, all works fine but doesn't work an email.
After new signup in the log a see the error

Code: Select all

28 jun 2018 | 16:48:06,953 | WARN  | pool-4-thread-1 | components.signup.SignUpAssistant |     | An error occurred while sending an email to: xxxx@xxxx.xxx -- javax.mail.MessagingException: Exception reading response;
  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
28 jun 2018 | 16:48:06,954 | WARN  | pool-4-thread-1 | entities.managers.SFSPostOffice |     | Failed sending email: { Email To: xxxx@xxxx.xxx , From: xxxx@xxxx.xxx , Subject: Thanks for signing up! }, javax.mail.MessagingException: Exception reading response;
  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

All certificates added by keytool.exe.
What is the problem?

Re: Mail doesn't work

Posted: 29 Jun 2018, 08:11
by Lapo
Hi,
it looks like an SSL communication issue with your SMTP server.
Have you tried using a google SMTP (gmail)? They usually work without issues.

All certificates added by keytool.exe.

What certificates exactly?

Thanks

Re: Mail doesn't work

Posted: 30 Jun 2018, 08:55
by HTCraft
Lapo, thanks for reply!
Solved!
After adding root certificates (and all other in chain) to C:\Program Files\SmartFoxServer_2X\jre\lib\security\cacerts the mail works fine.

Re: Mail doesn't work

Posted: 02 Jul 2018, 08:01
by Lapo
Good to know, thanks!