I am at my wits end....
All I want to do is set the From using a command line mail in a script.
I have tried mutt, mail, mailx...
Here is on command I tried:
echo "Once again" | mail -s "Maybe this time" -A file.csv [email protected] -r 'John <[email protected]>' -a From:John\<[email protected]\>
And another:
mutt -e "set [email protected]"...
And another:
mutt -e "set [email protected]" -e "set realname=John"
My /etc/mailname
has the name I want too. I also tried configuring a muttrc file and that doesn't work
And another try:
mailx -r "[email protected]" -a "From:[email protected]" -s "Subject" -A "/opt/file.csv" "[email protected]" <<< Some Text
Any ideas I can try?
I assume that you have configured
[email protected]
in an extra configuration file (~/.mutt/accounts/john
) which you usually source as soon as you start using it inmutt
. Simply load that configuration.An account specific configuration file may look like this (
msmtp
is used in this case to send mails):