submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree
[gitweb.git] / git-send-email.perl
index f4c07908d2737203031bdcab7f4f30404e64d4e5..2be5dac337a0e2f4a0ea1538c7873aa43382cb04 100755 (executable)
@@ -1479,7 +1479,7 @@ sub send_message {
                                                         SSL => 1);
                        }
                }
-               else {
+               elsif (!$smtp) {
                        $smtp_server_port ||= 25;
                        $smtp ||= Net::SMTP->new($smtp_server,
                                                 Hello => $smtp_domain,
@@ -1501,7 +1501,6 @@ sub send_message {
                                        $smtp->starttls(ssl_verify_params())
                                                or die sprintf(__("STARTTLS failed! %s"), IO::Socket::SSL::errstr());
                                }
-                               $smtp_encryption = '';
                                # Send EHLO again to receive fresh
                                # supported commands
                                $smtp->hello($smtp_domain);