1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-05 14:06:15 +02:00

New send-email option smtpserveroption.

The new command line parameter --smtp-server-option or default
configuration sendemail.smtpserveroption can be used to pass
specific options to the SMTP server. Update the documentation
accordingly.

Signed-off-by: Pascal Obry <pascal@obry.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Pascal Obry 2010-09-06 20:12:11 +02:00 committed by Junio C Hamano
parent 1d02a0055a
commit 052fbea26e
3 changed files with 17 additions and 1 deletions

View File

@ -1717,6 +1717,7 @@ sendemail.to::
sendemail.smtpdomain::
sendemail.smtpserver::
sendemail.smtpserverport::
sendemail.smtpserveroption::
sendemail.smtpuser::
sendemail.thread::
sendemail.validate::

View File

@ -165,6 +165,15 @@ user is prompted for a password while the input is masked for privacy.
are also accepted. The port can also be set with the
'sendemail.smtpserverport' configuration variable.
--smtp-server-option=<option>::
If set, specifies the outgoing SMTP server option to use.
Default value can be specified by the 'sendemail.smtpserveroption'
configuration option.
+
The --smtp-server-option option must be repeated for each option you want
to pass to the server. Likewise, different lines in the configuration files
must be used for each option.
--smtp-ssl::
Legacy alias for '--smtp-encryption ssl'.

View File

@ -60,6 +60,7 @@ sub usage {
--envelope-sender <str> * Email envelope sender.
--smtp-server <str:int> * Outgoing SMTP server to use. The port
is optional. Default 'localhost'.
--smtp-server-option <str> * Outgoing SMTP server option to use.
--smtp-server-port <int> * Outgoing SMTP server port.
--smtp-user <str> * Username for SMTP-AUTH.
--smtp-pass <str> * Password for SMTP-AUTH; not necessary.
@ -188,7 +189,8 @@ sub do_edit {
# Variables with corresponding config settings
my ($thread, $chain_reply_to, $suppress_from, $signed_off_by_cc, $cc_cmd);
my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_encryption);
my ($smtp_server, $smtp_server_port, @smtp_server_options);
my ($smtp_authuser, $smtp_encryption);
my ($identity, $aliasfiletype, @alias_files, $smtp_domain);
my ($validate, $confirm);
my (@suppress_cc);
@ -210,6 +212,7 @@ sub do_edit {
my %config_settings = (
"smtpserver" => \$smtp_server,
"smtpserverport" => \$smtp_server_port,
"smtpserveroption" => \@smtp_server_options,
"smtpuser" => \$smtp_authuser,
"smtppass" => \$smtp_authpass,
"smtpdomain" => \$smtp_domain,
@ -279,6 +282,7 @@ sub signal_handler {
"no-bcc" => \$no_bcc,
"chain-reply-to!" => \$chain_reply_to,
"smtp-server=s" => \$smtp_server,
"smtp-server-option=s" => \@smtp_server_options,
"smtp-server-port=s" => \$smtp_server_port,
"smtp-user=s" => \$smtp_authuser,
"smtp-pass:s" => \$smtp_authpass,
@ -1015,6 +1019,8 @@ sub send_message {
}
}
unshift (@sendmail_parameters, @smtp_server_options);
if ($dry_run) {
# We don't want to send the email.
} elsif ($smtp_server =~ m#^/#) {