You can send a message via mutt with a command like so:
mutt -s "Test Email" [email protected] < message.txt
This will send a message from the default account.
I have two e-mail accounts set up with mutt and I want to send a message from the account that is not the default. I tried changing the From field via -e 'my_hdr From:[email protected]
but the attempt failed with a SendAsDeniedException
(my default e-mail is with Microsoft outlook.com).
So how can I send a message from the other account via the command line? (I want to automate my messages.)
I assume that you have configured your accounts in separate files. Simply load the corresponding configuration beforehand.