Merge branch 'jk/send-email-ssl-errors'
authorJunio C Hamano <gitster@pobox.com>
Mon, 21 Dec 2015 18:59:06 +0000 (10:59 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Dec 2015 18:59:06 +0000 (10:59 -0800)
Improve error reporting when SMTP TLS fails.

* jk/send-email-ssl-errors:
send-email: enable SSL level 1 debug output

git-send-email.perl
index 2a3873b744b313c8871f339911ed7fba4fb34d99..6caa5b563fafb09cee5eb8f35283e7b9fa967439 100755 (executable)
@@ -1332,6 +1332,13 @@ sub send_message {
                        require Net::SMTP::SSL;
                        $smtp_domain ||= maildomain();
                        require IO::Socket::SSL;
+
+                       # Suppress "variable accessed once" warning.
+                       {
+                               no warnings 'once';
+                               $IO::Socket::SSL::DEBUG = 1;
+                       }
+
                        # Net::SMTP::SSL->new() does not forward any SSL options
                        IO::Socket::SSL::set_client_defaults(
                                ssl_verify_params());