# Ambiguous -from of git-send-email

5 messages from 2008-08-31 to 2008-09-02. Participants: Sheng Yang, Ask Bjørn Hansen, Jakub Narebski.
Thread: https://gitlist.dev/t/15295

## Sheng Yang, 2008-08-31 05:57

Subject: Ambiguous -from of git-send-email
Message-ID: <20080831055710.GA644@yukikaze>
URL: https://gitlist.dev/e/20080831055710.GA644%40yukikaze

```
Hi, all

A trivial problem here, but I think it can be handled more clearly.

Recently when I begin to use git-send-email with my private email
account, I found it didn't work as I expected. The problem is "From" of
the patch. I have to specify my company email in the "From" which meant
the author, but when I go with default value of git-send-email, I found
it omit the additional "From" of patch in the mailbody.

For example, I specified "my@company.com" in patch's "From: " when used
git-format-patch to generate it. And I use "my@home.com" to send the
mail.  But if I go with default setting of git-send-email, it said the
mail would be sent as "from my@company.com"(of course it can't). At
last, the sent mail only got "From my@home.com" in mail header, and
"From my@company.com" was omitted.

I've checked the git-send-email code, and found what's the real meaning
of "-from" specify in git-send-email is the email account(sender) rather
than the author. And if the sender is the same as the author, the first
line of patch "From: xxx" was omitted. But at least on my machine, the
from specified in the mail would be overwritten by MTA/ISP(well, I am
not sure which of them did this), so what's the content of "-from" is
not important, but if "-from" is the same as "From" in the patch, the
"From" line in the patch is omitted, otherwise the line is kept.

Yeah, it's reasonable. But I think it's not that clear. "-from" of
git-send-email indicated the sender and "From" indicated the author is
very ambiguous.  Maybe use "-sender" here in parameter is more
reasonable? And do we need some notes in manual?

And can we add a something like "sendemail.sender" to specify the
sender? I think it's not that unusual to make author's email address is
different from sender, at least I think it's more common than
"sendmail.bcc".

If you agree, I'd like to offer a patch for "sendemail.sender"(maybe
also give some note in manual for "-from").

Thanks!

--
regards
Yang, Sheng

```

## Ask Bjørn Hansen, 2008-08-31 19:37

Subject: Re: Ambiguous -from of git-send-email
Message-ID: <1A4402DD-03B5-4951-B8CA-DB8A8E93D8C4@develooper.com>
URL: https://gitlist.dev/e/1A4402DD-03B5-4951-B8CA-DB8A8E93D8C4%40develooper.com
In-Reply-To: <20080831055710.GA644@yukikaze>

```

On Aug 30, 2008, at 22:57, Sheng Yang wrote:

> And can we add a something like "sendemail.sender" to specify the
> sender? I think it's not that unusual to make author's email address  
> is
> different from sender, at least I think it's more common than
> "sendmail.bcc".

Try the sendemail.envelopesender option.  I'll make a patch for adding  
that to the documentation.


  - ask

-- 
http://develooper.com/ - http://askask.com/

```

## Ask Bjørn Hansen, 2008-08-31 20:32

Subject: [PATCH] Document sendemail.envelopesender configuration
Message-ID: <1220214763-25790-1-git-send-email-ask@develooper.com>
URL: https://gitlist.dev/e/1220214763-25790-1-git-send-email-ask%40develooper.com
In-Reply-To: <1A4402DD-03B5-4951-B8CA-DB8A8E93D8C4@develooper.com>

```

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
---
 Documentation/git-send-email.txt |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index e2437f3..e3f82da 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -179,6 +179,9 @@ user is prompted for a password while the input is masked for privacy.
 	This is useful if your default address is not the address that is
 	subscribed to a list. If you use the sendmail binary, you must have
 	suitable privileges for the -f parameter.
+	Default is the value of the 'sendemail.envelopesender' configuration
+ 	value; if that is unspecified, choosing the envelope sender is left
+	to your MTA.
 
 --to::
 	Specify the primary recipient of the emails generated.
-- 
1.6.0.1.158.ga28da.dirty

```

## Jakub Narebski, 2008-08-31 21:01

Subject: Re: [PATCH] Document sendemail.envelopesender configuration
Message-ID: <g9f0qk$sp2$1@ger.gmane.org>
URL: https://gitlist.dev/e/g9f0qk%24sp2%241%40ger.gmane.org
In-Reply-To: <1220214763-25790-1-git-send-email-ask@develooper.com>

```
Ask Bj?rn Hansen wrote:

> +       Default is the value of the 'sendemail.envelopesender' configuration
> +       value; if that is unspecified, choosing the envelope sender is left

s/configuration value/configuration variable/

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```

## Ask Bjørn Hansen, 2008-09-02 02:51

Subject: Re: [PATCH] Document sendemail.envelopesender configuration
Message-ID: <03CD327C-0146-4B62-ADA3-D327C35A056D@develooper.com>
URL: https://gitlist.dev/e/03CD327C-0146-4B62-ADA3-D327C35A056D%40develooper.com
In-Reply-To: <g9f0qk$sp2$1@ger.gmane.org>

```

On Aug 31, 2008, at 14:01, Jakub Narebski wrote:

>> +       Default is the value of the 'sendemail.envelopesender'  
>> configuration
>> +       value; if that is unspecified, choosing the envelope sender  
>> is left
>
> s/configuration value/configuration variable/

Hi Jakub,

I thought so too, but used value for internal consistency with (most  
of) the rest of that documentation file.


- ask

-- 
http://develooper.com/ - http://askask.com/

```
