Bypass hostname verification with sendemail.sslVerify

With the introduction of [1] certificates without or with a
non-matching hostname would trigger a CertificateException.
Not setting the SSLParameters when sslVerify is set to false should
allow such certificates when using TLS.

[1] https://gerrit-review.googlesource.com/#/c/75724/

Change-Id: I0411fc8d4defe456727602a508a68d731b7777da
diff --git a/gerrit-patch-commonsnet/src/main/java/org/apache/commons/net/smtp/AuthSMTPClient.java b/gerrit-patch-commonsnet/src/main/java/org/apache/commons/net/smtp/AuthSMTPClient.java
index ece982d..d24d179 100644
--- a/gerrit-patch-commonsnet/src/main/java/org/apache/commons/net/smtp/AuthSMTPClient.java
+++ b/gerrit-patch-commonsnet/src/main/java/org/apache/commons/net/smtp/AuthSMTPClient.java
@@ -57,9 +57,11 @@
 
     _socket_ = sslFactory(verify).createSocket(_socket_, hostname, port, true);
 
-    SSLParameters sslParams = new SSLParameters();
-    sslParams.setEndpointIdentificationAlgorithm("HTTPS");
-    ((SSLSocket)_socket_).setSSLParameters(sslParams);
+    if (verify) {
+      SSLParameters sslParams = new SSLParameters();
+      sslParams.setEndpointIdentificationAlgorithm("HTTPS");
+      ((SSLSocket)_socket_).setSSLParameters(sslParams);
+    }
 
     // XXX: Can't call _connectAction_() because SMTP server doesn't
     // give banner information again after STARTTLS, thus SMTP._connectAction_()