<<< Date Index >>>     <<< Thread Index >>>

Re: Hook for changing msmtp account



Salvatore Iovene <salvatore@xxxxxxxxxx> writes:

> I use mutt+msmtp and want to use a different msmtp account according
> to what my "From:" is.
>
> How can I do this?

In my ~/.muttrc, I have:

#
# Mail sending
#
set sendmail="/usr/bin/msmtp"
set use_envelope_from=yes
set use_from=yes


In my ~/.msmtprc, I have:

#
# main account
#
account mainaccount
host smtp.isp.tld
from mainaccount@xxxxxxx

#
# another
#
account anotheraccount
host smtp.isp2.tld2
from anotheraccount@xxxxxxxxx

#
# specify default
#
account default : mainaccount



This works well.

-- 
Nicolas