问题
Refer this Change sender's address in mutt via console
I have same issue in a shell script using mutt. Tried updating the header (-e), sending env variable EMAIL, updated ~/.muttrc (There is no entry in /etc/Muttrc so that does not have an effect) but no change.I still get "From" address as what is set by host.
Please help.
回答1:
I tried some more options and this is what eventually worked.
$MUTT -e "set from=DoNotReply" -s "$MAIL_SUBJECT" -a $FILE_LIST -- $MAIL_RECEPIENTS
回答2:
Set set use_envelope_from = yes
in your .muttrc. This adds the -f option when calling
sendmail to deliver the mail, forcing it to use the same address for the envelope as for the From: header field.
来源:https://stackoverflow.com/questions/46903584/from-address-in-mutt-not-working