Since e67a228cd8a ("send-email: automatically determine transfer-encoding"), the value of sendmail.transferencoding in the configuration file is ignored, because $target_xfer_encoding is already defined read_config sub parses the configuration file. Instead of initializing variable $target_xfer_encoding to 'auto' on definition, we have to set it to the default value of 'auto' if is undefined after calling read_config() twice to parsing the configuration files for "sendemail.transferencoding" and "sendemail.$ident.transferencoding". It was made trivial to do so by the previous change. Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 98bc295c6e..b9dd775b63 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -231,7 +231,7 @@ sub do_edit { my (@suppress_cc); my ($auto_8bit_encoding); my ($compose_encoding); -my $target_xfer_encoding = 'auto'; +my ($target_xfer_encoding); my ($debug_net_smtp) = 0; # Net::SMTP, see send_message() @@ -271,7 +271,7 @@ sub do_edit { "from" => [\$sender], "assume8bitencoding" => [\$auto_8bit_encoding], "composeencoding" => [\$compose_encoding], - "transferencoding" => [\$target_xfer_encoding], + "transferencoding" => [\$target_xfer_encoding, 'auto'], ); my %config_path_settings = ( -- 2.21.0-777-g83232e3864