Java - sending email via javamail and using SSL -


i trying send email on ssl, have certificate , have imported cacerts file. assumed default, java cacerts file in java_home, or in jdk specified project. not case , set system property keystore , truststore point path cacerts found, did in following way:

system.setproperty("javax.net.ssl.keystore", java_home + "\\jre\\lib\\security\\cacerts"); system.setproperty("javax.net.ssl.truststore",java_home + "\\jre\\lib\\security\\cacerts"); system.setproperty("javax.net.ssl.keystorepassword", password); system.setproperty("javax.net.ssl.truststorepassword", password); 

this doesn't work either, after specifying path keep getting following error:

caused by: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target

i have read numerous posts on here (stackoverflow) , other websites , can't manage work. know why happening? or maybe can tell me if there things should check before.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -