Signed-off-by: Drew DeVault <sir@xxxxxxxxx> --- Documentation/git-send-email.txt | 4 ++-- git-send-email.perl | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index c17c3b400a..520b355e50 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -171,8 +171,8 @@ Sending Specify the encryption to use, either 'ssl' or 'tls'. 'ssl' enables generic SSL/TLS support and is typically used on port 465. 'tls' enables in-band STARTTLS support and is typically used on port 25 or - 587. Use whichever option is recommended by your mail provider. Any - other value reverts to plain SMTP. Default is the value of + 587. Use whichever option is recommended by your mail provider. Leave + empty to disable encryption and use plain SMTP. Default is the value of `sendemail.smtpEncryption`. --smtp-domain=<FQDN>:: diff --git a/git-send-email.perl b/git-send-email.perl index f5bbf1647e..bda5211f0d 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -495,6 +495,9 @@ sub read_config { # 'default' encryption is none -- this only prevents a warning $smtp_encryption = '' unless (defined $smtp_encryption); +if ($smtp_encryption ne "" && $smtp_encryption ne "ssl" && $smtp_encryption ne "tls") { + die __("Invalid smtp_encryption configuration: expected 'ssl', 'tls', or nothing.\n"); +} # Set CC suppressions my(%suppress_cc); -- 2.31.1