I want to dynamically set the sender's address when using mutt via console (not composing). I checked everything which is described, tried everything from this SO question but nothing works. There is no change at all, no matter what I do. I set
set from="sender@help.me"
set edit_headers=yes
in both the /etc/Muttrc and ~/.muttrc, also, I tried all sort of -e commands, like
-e "set from=email@example.com"
-e 'my_hdr From:sender@help.me'
-e "send-hook . 'my_hdr From: Other Name <otheremail\@example.com>'"
having export EMAIL=sender@help.me in front
but I will always receive mails from username@compname.de
A typical call looks like this
export EMAIL="sender@help.me" && echo | mutt -s "VERSANDTEST" -c "mycc@help.me" -e 'my_hdr From:sender@help.me' -a /opt/data/YoloDat.txt /opt/data/TroloDat.txt -- "myaddress@help.me" < /tmp/mailbody
Any more ideas appreciated