1

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.

Guru
  • 148
  • 1
  • 12

2 Answers2

0

I tried some more options and this is what eventually worked.

$MUTT -e "set from=DoNotReply" -s "$MAIL_SUBJECT" -a $FILE_LIST -- $MAIL_RECEPIENTS

Guru
  • 148
  • 1
  • 12
0

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.

elim
  • 1,404
  • 1
  • 16
  • 17