I have problem with Java Email using SMTP & TSl, please help me resolve this problem. I think the problem was Transport, but I'm not sure. Below is my code and error snippets, please help me find my mistake and solution.

TSLEmail.class

```
import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;

public class TSLEmail 
{
  public static void main(String[] args) 
  {
      final String fromEmail = "mail@gmail.com"; //requires valid 
      gmail id
      final String password = "mypass12"; // correct password for gmail id
      final String toEmail = "recipients@gmail.com"; // can be any email id 

      System.out.println("TLSEmail Start");
      Properties props = new Properties();
      props.put("mail.smtp.host", "10.20.200.220"); //SMTP Host
      props.put("mail.user", "user12");
     //props.put("mail.password", password);
     props.put("mail.smtp.port", "587"); //TLS Port
     props.put("mail.smtp.auth", "true"); //enable authentication
     props.put("mail.smtp.starttls.enable", "true"); //enable STARTTLS

     //create Authenticator object to pass in Session.getInstance argument
     Authenticator auth = new Authenticator() {
                     //override the getPasswordAuthentication method
                     protected PasswordAuthentication 
        getPasswordAuthentication() {
                                     return new 
        PasswordAuthentication(fromEmail, password);
                     }
        };
       Session session = Session.getInstance(props, auth);

       EmailUtil.sendEmail(session, toEmail,"TLSEmail Testing Subject", 
       "TLSEmail Testing Body");

     }
   }

```

EmailUtil.class

```
import java.util.Date;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

 public class EmailUtil 
 {
   public static void sendEmail(Session session, String toEmail, String 
   subject, String body)
   {
      try
      {
        MimeMessage msg = new MimeMessage(session);
        //set message headers
        msg.addHeader("Content-type", "text/HTML; charset=UTF-8");
        msg.addHeader("format", "flowed");
        msg.addHeader("Content-Transfer-Encoding", "8bit");

        msg.setFrom(new InternetAddress("mail@gmail.com"));

        msg.setReplyTo(InternetAddress.parse("recipients@gmail.com"));

        msg.setSubject(subject, "UTF-8");

        msg.setText(body, "UTF-8");

        msg.setSentDate(new Date());

        msg.setRecipients(Message.RecipientType.TO, 
        InternetAddress.parse(toEmail, false));

        System.out.println("Message is ready");
        Transport.send(msg);  

         System.out.println("EMail Sent Successfully!!");
        }
       catch (Exception e) {
         e.printStackTrace();
       }
     }
  }

```

The Results(ERROR):

```
TLSEmail Start
Message is ready
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
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1564)
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1551)
    at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:935)
    at 
     com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:426)
    at javax.mail.Service.connect(Service.java:310)
    at javax.mail.Service.connect(Service.java:169)
    at javax.mail.Service.connect(Service.java:118)
    at javax.mail.Transport.send0(Transport.java:188)
    at javax.mail.Transport.send(Transport.java:118)
    at com.bca.controller.EmailUtil.sendEmail(EmailUtil.java:35)
    at com.bca.controller.TSLEmail.main(TSLEmail.java:34)
Caused by: 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
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
    at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
    at sun.security.ssl.Handshaker.processLoop(Unknown Source)
    at sun.security.ssl.Handshaker.process_record(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown 
       Source)
    at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at sun.security.ssl.AppOutputStream.write(Unknown Source)
    at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:114)
    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
    at java.io.BufferedOutputStream.flush(Unknown Source)
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1562)
       ... 10 more
 Caused by: sun.security.validator.ValidatorException: PKIX path building 
 failed: sun.security.provider.certpath.SunCertPathBuilderException: unable 
 to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
    at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown 
       Source)
       ... 22 more
 Caused by: sun.security.provider.certpath.SunCertPathBuilderException: 
 unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown 
        Source)
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown 
        Source)
    at java.security.cert.CertPathBuilder.build(Unknown Source)
       ... 28 more

```

Please help me find an simple and certain solution for my problem. 
Thank You