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

前端 未结 6 1870
傲寒
傲寒 2020-12-23 14:30

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

6条回答
  •  执念已碎
    2020-12-23 15:10

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

    set from="Fubar "
    

    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.

提交回复
热议问题