1

I have this small ejb bean that sends emails, I use JavaMail Session on the Glassfish. On the settings of Admin Glassfish under Java Mail Session I use Google credentials to send/receive emails. With google account I can receive and send emails but when I try with personal email of my dedicated server for example my@dommainname.com then then the Glassfish is not sending/receiving any emails.

I have suspicion that I don't fill correct information on Glassfish under JavaMail Session. On the tab "Advanced" under JavaMail Session there are 4 fields required some information about my mail server:

Store Protocol: imap
Store Protocol Class:com.sun.mail.imap.IMAPStore
Transport Protocol: smtp
Transport Protocol Class:com.sun.mail.smtp.SMTPTransport

Why is it when I use google gmail account it works perfectly but is not sending any emails nor receiving when I use email of my own domainname? The application hangs with loading and I get this error:

type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Could not convert socket to TLS
root cause

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
root cause

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
root cause

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
root cause

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Aurora0001
  • 10,827
  • 5
  • 47
  • 50
aidamail
  • 11
  • 1
  • i found on google the [solution](https://stackoverflow.com/questions/16115453/javamail-could-not-convert-socket-to-tls-gmail) to my problem. – aidamail Aug 23 '17 at 18:51

0 Answers0