Only necessary if --compose is also set. If --compose
is not set, this will be prompted for.
+--[no-]outlook-id-fix::
+ Microsoft Outlook SMTP servers discard the Message-ID sent via email and
+ assign a new random Message-ID, thus breaking threads.
++
+With `--outlook-id-fix`, 'git send-email' uses a mechanism specific to
+Outlook servers to learn the Message-ID the server assigned to fix the
+threading. Use it only when you know that the server reports the
+rewritten Message-ID the same way as Outlook servers do.
++
+Without this option specified, the fix is done by default when talking
+to 'smtp.office365.com' or 'smtp-mail.outlook.com'. Use
+`--no-outlook-id-fix` to disable even when talking to these two servers.
+
--subject=<string>::
Specify the initial subject of the email thread.
Only necessary if --compose is also set. If --compose
--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.
--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.
my $mailmap = 0;
my $target_xfer_encoding = 'auto';
my $forbid_sendmail_variables = 1;
+my $outlook_id_fix = 'auto';
my %config_bool_settings = (
"thread" => \$thread,
"xmailer" => \$use_xmailer,
"forbidsendmailvariables" => \$forbid_sendmail_variables,
"mailmap" => \$mailmap,
+ "outlookidfix" => \$outlook_id_fix,
);
my %config_settings = (
"relogin-delay=i" => \$relogin_delay,
"git-completion-helper" => \$git_completion_helper,
"v=s" => \$reroll_count,
+ "outlook-id-fix!" => \$outlook_id_fix,
);
$rc = GetOptions(%options);
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.