diff options
| author | Aditya Garg <gargaditya08@live.com> | 2025-04-29 16:37:09 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-29 10:06:52 -0700 |
| commit | daec3c08e3e40c436cab013c5005a6e8b2e7923e (patch) | |
| tree | 31fb5f4a8386de5ef2fed5231f09c4138bd8d432 /git-send-email.perl | |
| parent | send-email: retrieve Message-ID from outlook SMTP server (diff) | |
| download | git-daec3c08e3e40c436cab013c5005a6e8b2e7923e.tar.gz git-daec3c08e3e40c436cab013c5005a6e8b2e7923e.zip | |
send-email: add --[no-]outlook-id-fix option
Add an option to allow users to specifically enable or disable
retrieving the Message-ID from the Outlook SMTP server. This can be used
for other hosts mimicking the behaviour of Outlook, or for users who set
a custom domain to be a CNAME for the Outlook SMTP server.
While at it, lets also add missing * in description of --no-smtp-auth.
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
| -rwxr-xr-x | git-send-email.perl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index 618474916e..4215f8f7e9 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -41,6 +41,8 @@ git send-email --translate-aliases --subject <str> * Email "Subject:" --reply-to <str> * Email "Reply-To:" --in-reply-to <str> * Email "In-Reply-To:" + --[no-]outlook-id-fix * The SMTP host is an Outlook server that munges the + Message-ID. Retrieve it from the server. --[no-]xmailer * Add "X-Mailer:" header (default). --[no-]annotate * Review each patch that will be sent in an editor. --compose * Open an editor for introduction. @@ -68,7 +70,7 @@ git send-email --translate-aliases --smtp-auth <str> * Space-separated list of allowed AUTH mechanisms, or "none" to disable authentication. This setting forces to use one of the listed mechanisms. - --no-smtp-auth Disable SMTP authentication. Shorthand for + --no-smtp-auth * Disable SMTP authentication. Shorthand for `--smtp-auth=none` --smtp-debug <0|1> * Disable, enable Net::SMTP debug. @@ -290,6 +292,7 @@ my $validate = 1; my $mailmap = 0; my $target_xfer_encoding = 'auto'; my $forbid_sendmail_variables = 1; +my $outlook_id_fix = 'auto'; my %config_bool_settings = ( "thread" => \$thread, @@ -305,6 +308,7 @@ my %config_bool_settings = ( "xmailer" => \$use_xmailer, "forbidsendmailvariables" => \$forbid_sendmail_variables, "mailmap" => \$mailmap, + "outlookidfix" => \$outlook_id_fix, ); my %config_settings = ( @@ -551,6 +555,7 @@ my %options = ( "relogin-delay=i" => \$relogin_delay, "git-completion-helper" => \$git_completion_helper, "v=s" => \$reroll_count, + "outlook-id-fix!" => \$outlook_id_fix, ); $rc = GetOptions(%options); @@ -1576,7 +1581,12 @@ Message-ID: $message_id sub is_outlook { my ($host) = @_; - return ($host eq 'smtp.office365.com' || $host eq 'smtp-mail.outlook.com'); + if ($outlook_id_fix eq 'auto') { + $outlook_id_fix = + ($host eq 'smtp.office365.com' || + $host eq 'smtp-mail.outlook.com') ? 1 : 0; + } + return $outlook_id_fix; } # Prepares the email, then asks the user what to do. |
