git-send-email: Read the default SMTP server from the GIT config file
Make the default value for --smtp-server configurable through the 'sendemail.smtpserver' option in .git/config (or $HOME/.gitconfig). Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Acked-by: Ryan Anderson <rda@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
9c572b21dd
commit
6dcfa306f2
@ -230,6 +230,9 @@ if (!defined $initial_reply_to && $prompting) {
|
||||
$initial_reply_to =~ s/(^\s+|\s+$)//g;
|
||||
}
|
||||
|
||||
if (!$smtp_server) {
|
||||
$smtp_server = $repo->config('sendemail.smtpserver');
|
||||
}
|
||||
if (!$smtp_server) {
|
||||
foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
|
||||
if (-x $_) {
|
||||
|
||||
Reference in New Issue
Block a user