* Specifying account profile in MSMTP
@ 2014-09-24 16:52 Robert Dailey
2014-10-19 0:46 ` Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: Robert Dailey @ 2014-09-24 16:52 UTC (permalink / raw)
To: Git
Hey guys,
I'm using MSMTP to define 2 accounts: Work email and personal email.
If I send patches via email through Git at work, I want to use my work
SMTP server and account information. Likewise at home for personal
projects, I want to use my personal SMTP account.
I put my .gitconfig in Dropbox and I share it across all of my
machines, so I avoid putting my SMTP server information in my global
config because I'd then have to use the same account everywhere.
However, I do not define a "default" account in my MSMTP file (which
is also in dropbox, in fact my whole home directory is in there).
Is there a way to specify the MSMTP account to use at the command line
when I run `git send-email`? If not, are there other good solutions to
this problem?
If not, I might contribute an option to send-email to feed down into
MSMTP.exe so that I can specify the account to use. I'm not familiar
at all with MSMTP so I want to ask here first. Thank you!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Specifying account profile in MSMTP
2014-09-24 16:52 Specifying account profile in MSMTP Robert Dailey
@ 2014-10-19 0:46 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2014-10-19 0:46 UTC (permalink / raw)
To: Robert Dailey; +Cc: Git
Robert Dailey <rcdailey.lists@gmail.com> wrote:
> Hey guys,
>
> I'm using MSMTP to define 2 accounts: Work email and personal email.
> If I send patches via email through Git at work, I want to use my work
> SMTP server and account information. Likewise at home for personal
> projects, I want to use my personal SMTP account.
>
> I put my .gitconfig in Dropbox and I share it across all of my
> machines, so I avoid putting my SMTP server information in my global
> config because I'd then have to use the same account everywhere.
> However, I do not define a "default" account in my MSMTP file (which
> is also in dropbox, in fact my whole home directory is in there).
>
> Is there a way to specify the MSMTP account to use at the command line
> when I run `git send-email`? If not, are there other good solutions to
> this problem?
msmtprc can be configured to picks accounts based on the envelop sender
specified by git send-email.
I make sure my email address in the git commits is correct and use
use envelopesender=auto for git send-email when using msmtp.
Config examples below:
----------- ~/.gitconfig ---------------
[sendemail]
smtpserver = /usr/bin/msmtp
envelopesender = auto
---- /path/to/project_a/.git/config ----
[user]
email = a@example.com
---- /path/to/project_b/.git/config ----
[user]
email = b@example.com
------------ ~/.msmtprc ----------------
account a
host ...
from a@example.com
user a
password ...
auth ...
account b
host ...
from b@example.com
user b
password ...
auth ...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-19 0:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24 16:52 Specifying account profile in MSMTP Robert Dailey
2014-10-19 0:46 ` Eric Wong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.