How to change the sender's name or e-mail address in mutt?

user1630087 picture user1630087 · Aug 28, 2012 · Viewed 104.1k times · Source

How can I change the sender's name or e-mail address (From: header) used by mutt?

Answer

ArjunShankar picture ArjunShankar · Aug 28, 2012

Normally, mutt sets the From: header based on the from configuration variable you set in ~/.muttrc:

set from="Fubar <foo@bar>"

If this is not set, mutt uses the EMAIL environment variable by default. In which case, you can get away with calling mutt like this on the command line (as opposed to how you showed it in your comment):

EMAIL="foo@bar" mutt -s '$MailSubject' -c "abc@def"

However, if you want to be able to edit the From: header while composing, you need to configure mutt to allow you to edit headers first. This involves adding the following line in your ~/.muttrc:

set edit_headers=yes

After that, next time you open up mutt and are composing an E-mail, your chosen text editor will pop up containing the headers as well, so you can edit them. This includes the From: header.