# smtp server on windows

3 messages from 2010-09-04 to 2010-09-04. Participants: Pascal Obry, Ævar Arnfjörð Bjarmason.
Thread: https://gitlist.dev/t/24971

## Pascal Obry, 2010-09-04 14:03

Subject: smtp server on windows
Message-ID: <4C8251A0.1020809@obry.net>
URL: https://gitlist.dev/e/4C8251A0.1020809%40obry.net

```

Hi there,

One simple SMTP server on Windows (using Cygwin) is msmtp.

I'd like to use two different SMTP accounts depending on the repository
I'm working (this is to get the proper identify on the from header).

I have two accounts configured and working in my ~/.msmtprc named gmail
and wanadoo.

I have on my .git/config to send e-mail (and this is working):

[sendemail]
        smtpserver = /usr/sbin/msmtp

This is using the default account as specified in my .msmtprc. I want to
use a specific account (say gmail) for this repository, I tried:

[sendemail]
        smtpserver = /usr/sbin/msmtp --account=gmail

but this fails as smtpserver is expecting a simple executable. Is there
a way to pass some parameters to an smtpserver specified on a Git
configuration?

Thanks.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B

```

## Ævar Arnfjörð Bjarmason, 2010-09-04 14:24

Subject: Re: smtp server on windows
Message-ID: <AANLkTi=5f3+g9HrssNKj99PHr_2ymxGWmM=NjHwc94j2@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3D5f3%2Bg9HrssNKj99PHr_2ymxGWmM%3DNjHwc94j2%40mail.gmail.com
In-Reply-To: <4C8251A0.1020809@obry.net>

```
On Sat, Sep 4, 2010 at 14:03, Pascal Obry <pascal.obry@gmail.com> wrote:

> This is using the default account as specified in my .msmtprc. I want to
> use a specific account (say gmail) for this repository, I tried:
>
> [sendemail]
>        smtpserver = /usr/sbin/msmtp --account=gmail
>
> but this fails as smtpserver is expecting a simple executable. Is there
> a way to pass some parameters to an smtpserver specified on a Git
> configuration?

No, but you could modify this bit in git-send-email.perl:

    } elsif ($smtp_server =~ m#^/#) {
        my $pid = open my $sm, '|-';
        defined $pid or die $!;

Or, to make it work right now: just make a wrapper script.

```

## Pascal Obry, 2010-09-04 15:15

Subject: Re: smtp server on windows
Message-ID: <4C826291.6080606@obry.net>
URL: https://gitlist.dev/e/4C826291.6080606%40obry.net
In-Reply-To: <AANLkTi=5f3+g9HrssNKj99PHr_2ymxGWmM=NjHwc94j2@mail.gmail.com>

```
Le 04/09/2010 16:24, Ævar Arnfjörð Bjarmason a écrit :
> No, but you could modify this bit in git-send-email.perl:
> 
>     } elsif ($smtp_server =~ m#^/#) {
>         my $pid = open my $sm, '|-';
>         defined $pid or die $!;

Ok, thanks for the quick answer and the pointer. I have zero knowledge
in Perl so I probably won't be able to do that. I'll see...

> Or, to make it work right now: just make a wrapper script.

Right, I wanted to avoid that.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B

```
