tsend mail javax.mail.MessagingException

Five Stars

tsend mail javax.mail.MessagingException

I am facing problem while sending mail using my organisation smtp, But I can send email using Gmail smtp successfully.


It is shows following error:


javax.mail.MessagingException: Can't send command to SMTP host;
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



Tags (1)

Re: tsend mail javax.mail.MessagingException


The error indicates that something wrong your certification. The server certification is expire or not to be trusted.

Could you please check it?

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tsend mail javax.mail.MessagingException

Certification is not expired for sure because other applications are successfully using the same smtp for sending the email.

I think I made some mistake while passing the required attributes to the component.It would be a great help if you can provide an example mapping.