]> Pileus Git - ~andy/git/blobdiff - git-send-email.perl
Merge branch 'tb/clone-ssh-with-colon-for-port'
[~andy/git] / git-send-email.perl
index 3782c3b0cb4f9356790ae581c0d408dc4f4cae75..2016d9c6198957943a8bd2510e217fe72412062a 100755 (executable)
@@ -291,7 +291,7 @@ my $rc = GetOptions("h" => \$help,
                    "smtp-pass:s" => \$smtp_authpass,
                    "smtp-ssl" => sub { $smtp_encryption = 'ssl' },
                    "smtp-encryption=s" => \$smtp_encryption,
-                   "smtp-ssl-cert-path" => \$smtp_ssl_cert_path,
+                   "smtp-ssl-cert-path=s" => \$smtp_ssl_cert_path,
                    "smtp-debug:i" => \$debug_net_smtp,
                    "smtp-domain:s" => \$smtp_domain,
                    "identity=s" => \$identity,
@@ -1214,10 +1214,14 @@ X-Mailer: git-send-email $gitversion
                        $smtp_server_port ||= 465; # ssmtp
                        require Net::SMTP::SSL;
                        $smtp_domain ||= maildomain();
+                       require IO::Socket::SSL;
+                       # Net::SMTP::SSL->new() does not forward any SSL options
+                       IO::Socket::SSL::set_client_defaults(
+                               ssl_verify_params());
                        $smtp ||= Net::SMTP::SSL->new($smtp_server,
                                                      Hello => $smtp_domain,
                                                      Port => $smtp_server_port,
-                                                     ssl_verify_params());
+                                                     Debug => $debug_net_smtp);
                }
                else {
                        require Net::SMTP;