# Re: [PATCH 1/2] git-send-email: Document support for local sendmail instead of SMTP server

4 messages from 2006-10-29 to 2006-10-29. Participants: Ryan Anderson, Sergey Vlasov.
Thread: https://gitlist.dev/t/43383

## Sergey Vlasov, 2006-10-29 19:31

Subject: [PATCH 1/2] git-send-email: Document support for local sendmail instead of SMTP server
Message-ID: <11621502993406-git-send-email-vsu@altlinux.ru>
URL: https://gitlist.dev/e/11621502993406-git-send-email-vsu%40altlinux.ru

```
Fix the --smtp-server option description to match reality.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
---
 Documentation/git-send-email.txt |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 481b3f5..ec0e201 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -66,8 +66,11 @@ The options available are:
 	all that is output.
 
 --smtp-server::
-	If set, specifies the outgoing SMTP server to use.  Defaults to
-	localhost.
+	If set, specifies the outgoing SMTP server to use.  A full
+	pathname of a sendmail-like program can be specified instead;
+	the program must support the `-i` option.  Defaults to
+	`/usr/sbin/sendmail` or `/usr/lib/sendmail` if such program is
+	available, or to `localhost` otherwise.
 
 --subject::
    	Specify the initial subject of the email thread.
-- 
1.4.3.3.ge502

```

## Sergey Vlasov, 2006-10-29 19:31

Subject: [PATCH 2/2] git-send-email: Read the default SMTP server from the GIT config file
Message-ID: <11621503001930-git-send-email-vsu@altlinux.ru>
URL: https://gitlist.dev/e/11621503001930-git-send-email-vsu%40altlinux.ru
In-Reply-To: <11621502993406-git-send-email-vsu@altlinux.ru>

```
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>
---
 Documentation/git-send-email.txt |    8 +++++---
 git-send-email.perl              |    3 +++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index ec0e201..4c8d907 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -68,9 +68,11 @@ The options available are:
 --smtp-server::
 	If set, specifies the outgoing SMTP server to use.  A full
 	pathname of a sendmail-like program can be specified instead;
-	the program must support the `-i` option.  Defaults to
-	`/usr/sbin/sendmail` or `/usr/lib/sendmail` if such program is
-	available, or to `localhost` otherwise.
+	the program must support the `-i` option.  Default value can
+	be specified by the 'sendemail.smtpserver' configuration
+	option; the built-in default is `/usr/sbin/sendmail` or
+	`/usr/lib/sendmail` if such program is available, or
+	`localhost` otherwise.
 
 --subject::
    	Specify the initial subject of the email thread.
diff --git a/git-send-email.perl b/git-send-email.perl
index c42dc3b..4c87c20 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -231,6 +231,9 @@ if (!defined $initial_reply_to && $promp
 }
 
 if (!$smtp_server) {
+	$smtp_server = $repo->config('sendemail.smtpserver');
+}
+if (!$smtp_server) {
 	foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
 		if (-x $_) {
 			$smtp_server = $_;
-- 
1.4.3.3.ge502

```

## Ryan Anderson, 2006-10-29 20:34

Subject: Re: [PATCH 1/2] git-send-email: Document support for local sendmail instead of SMTP server
Message-ID: <87dcb0bd0610291234j587ebadcxf61e2f61777435c6@mail.gmail.com>
URL: https://gitlist.dev/e/87dcb0bd0610291234j587ebadcxf61e2f61777435c6%40mail.gmail.com
In-Reply-To: <11621502993406-git-send-email-vsu@altlinux.ru>

```
On 10/29/06, Sergey Vlasov <vsu@altlinux.ru> wrote:
> Fix the --smtp-server option description to match reality.
>
> Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Ryan Anderson <rda@google.com> (or ryan@michonline.com,

```

## Ryan Anderson, 2006-10-29 20:37

Subject: Re: [PATCH 2/2] git-send-email: Read the default SMTP server from the GIT config file
Message-ID: <87dcb0bd0610291237i1b4027a1p77bdcd84d38e05f4@mail.gmail.com>
URL: https://gitlist.dev/e/87dcb0bd0610291237i1b4027a1p77bdcd84d38e05f4%40mail.gmail.com
In-Reply-To: <11621503001930-git-send-email-vsu@altlinux.ru>

```
On 10/29/06, Sergey Vlasov <vsu@altlinux.ru> wrote:
> 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>

```
