0

I am developing code for sending email from my domain to gmail.com

I get a SSLHandshakeException (see below).
How to Solve this??

Exception in thread "main" 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
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • 1
    Is there any firewall settings on your server? – Arun Kumar Oct 11 '12 at 04:45
  • Comment in the answer to this question might help : http://stackoverflow.com/questions/12743846/unable-to-send-an-email-using-smtp-getting-javax-mail-messagingexception-could – TJ- Oct 11 '12 at 04:47

1 Answers1

-1

You are not using SSL, you are trying to send the mail in plain authentication, while you need a an SSL authenticated access.

neo571
  • 69
  • 1
  • 7