Search code examples
emailcentos6mutt

mutt or mail - reply to or from email


When running either the "mail" or "mutt" command, how do I set either the "reply-to" or "from" email address such that:

  • When the user clicks "reply", it goes to that email
  • The user can see the email they will be replying to in the "from" box

I have tried the following so far:

mail ... -S replyto="<email>" - clicking "reply" chooses correct email, but cannot tell until click "reply"

mail ... -r <email> ... does not work at all, it seems

( export REPLYTO="foo@bar.baz"; mutt .... ): same as mail -S above

The important thing is doing it from the command line, NOT from the configuration files. Every email we send out could have a different person that we need them to reply to.


Solution

  • I know that long time ago I did look for this and I ended up using mailx

    cat somefile|mailx -r "noreply@example.com" -s "important msg" destination@example.com