Merge branch 'jc/maint-log-grep' into maint
[gitweb.git] / git-send-email.perl
index 3564419e81694d84f4ebf036fe0df70277a81a98..d2fd89907688a044ffe0d2520744e00a9b33c942 100755 (executable)
@@ -38,7 +38,7 @@ package main;
 
 sub usage {
        print <<EOT;
-git-send-email [options] <file | directory>...
+git send-email [options] <file | directory>...
 Options:
    --from         Specify the "From:" line of the email to be sent.
 
@@ -773,6 +773,9 @@ sub send_message
                                        $smtp = Net::SMTP::SSL->start_SSL($smtp)
                                                or die "STARTTLS failed! ".$smtp->message;
                                        $smtp_encryption = '';
+                                       # Send EHLO again to receive fresh
+                                       # supported commands
+                                       $smtp->hello();
                                } else {
                                        die "Server does not support STARTTLS! ".$smtp->message;
                                }
@@ -879,7 +882,7 @@ sub send_message
                                }
                                elsif (/^Content-type:/i) {
                                        $has_content_type = 1;
-                                       if (/charset="?[^ "]+/) {
+                                       if (/charset="?([^ "]+)/) {
                                                $body_encoding = $1;
                                        }
                                        push @xh, $_;