title: Issue with using GMail SMTP from Payara 5 Java Mail
body: <p>I have just written a test standalone Java Mail Application to send an email from my gmail A/C to the outlook one and it works like a charm. Below are the essential properties for the Mail Session:</p>
  
  <pre><code>props.put("mail.smtp.host", "smtp.gmail.com");
  props.put("mail.smtp.port", "465");
  props.put("mail.smtp.auth", "true");
  props.put("mail.smtp.socketFactory.port", "465");
  props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
  props.put("mail.smtp.starttls.enable", "true");
  </code></pre>
  
  <p>However, moment I configure the same properties in the Glassfish 5 Java Email Session (on Admin console), I see the following error in the log, upon running the web application:</p>
  
  <pre><code> StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
  java.lang.NoSuchMethodError: sun.security.ssl.Handshaker.setApplicationProtocols([Ljava/lang/String;)V
      at sun.security.ssl.SSLSocketImpl.initHandshaker(SSLSocketImpl.java:1350)
  
  </code></pre>
  
  <p>PS - "Less secure app access" on Google A/C is set to ON for both the cases.</p>
  
  <p>Puzzled! Any help would be greatly appreciated.</p>