On Thu, Aug 11, 2016 at 05:48:01PM -0500, Peng Yu wrote: > Hi, I have msmtp set up on my computer. But I don't find how to > specify different accounts to send email from mutt command line. Does > anybody know how to do it? Thanks.
I am also using msmtp, but in a way so that different email addresses are mapped to different accounts in msmtprc because I use different login creds for different accounts: [common settings] account a from o...@example.com [server creds for account a] account b from t...@example.com [server creds for account b] account c [...and so on...] A more mutt-like solution could be to use send-hooks to set the $sendmail variable every time the From: header of an email changes. msmtp accepts the account to be used on the command line as -a $account, send-hook "~f o...@example.com" 'set sendmail = "/usr/bin/msmtp -a a"' send-hook "~f t...@example.com" 'set sendmail = "/usr/bin/msmtp -a b"'