asked many times
I have a question that has been asked many times, but I don't think it really has been answered: When replying to a mail how can I set the From: header line so that it corresponds to the To: address of the mail I am replying to? So far it's easy (reverse_name and set_from), but when _not_ replying, I want to use From: headers that correspond to the recipient of the new mail. Here is an example: When I write a new mail to the mutt-mailinglist I want From: to be: [EMAIL PROTECTED] But when I get a mail from someone who sent it to "[EMAIL PROTECTED]" I want From: to be "[EMAIL PROTECTED]" I tried it this way: send-hook '~C mutt-' 'my_hdr From: Andy Spiegl [EMAIL PROTECTED]' but then reverse_name doesn't work. So I tried: send-hook '~C mutt-' 'set from="Andy Spiegl [EMAIL PROTECTED]"' but then from is set for the next mail, not for the current one. *argh* How did you guys solve this dilemma? Thanks a lot in advance, Andy. -- E-Mail: [EMAIL PROTECTED] URL: http://andy.spiegl.de PGP/GPG: see headers o _ _ _ - __o __o /\_ _ \\o (_)\__/o (_) --- _`\,__`\,__(_) (_)/_\_| \ _|/' \/ -- (_)/ (_) (_)/ (_) (_)(_) (_)(_)' _\o_ ~~~ Sweater, n.: A garment worn by a child when its mother feels chilly.
Re: asked many times
On 2000.09.26, in [EMAIL PROTECTED], "Andy Spiegl" [EMAIL PROTECTED] wrote: So I tried: send-hook '~C mutt-' 'set from="Andy Spiegl [EMAIL PROTECTED]"' but then from is set for the next mail, not for the current one. *argh* This is good and correct. How did you guys solve this dilemma? You need to define a send-hook matching anything, with precedence over this send-hook, which resets $from to a default value. For example, I have this in my muttrc: send-hook '.' 'unmy_hdr Reply-To:' send-hook '~C postmaster@uchicago' 'my_hdr Reply-To: [EMAIL PROTECTED]' The first one unsets Reply-To: for any send, then passes on to the second. The second one sets Reply-To: for any mail to our postmaster address (which forwards to me). Not quite the same as setting $from, but close enough to illustrate. -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: asked many times
David Champion [EMAIL PROTECTED] wrote on Tue, 26 Sep 2000: send-hook '~C mutt-' 'set from="Andy Spiegl [EMAIL PROTECTED]"' but then from is set for the next mail, not for the current one. *argh* This is good and correct. Uhh, no. You can't use $from with send-hooks, because as the person posting noticed, the $from only comes into effect for the next email. You have to use "my_hdr From:" if you want to change the From line from send-hooks. Not sure if that's what you were talking about, or not. :-) Regards, Mikko -- // Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/ // The Corrs list maintainer // net.freak // DALnet IRC operator / // Interests: roleplaying, Linux, the Net, fantasy scifi, the Corrs / Did you know that the word "gullible" is not in the dictionary?
Re: asked many times
On 2000.09.26, in [EMAIL PROTECTED], "Mikko Hänninen" [EMAIL PROTECTED] wrote: David Champion [EMAIL PROTECTED] wrote on Tue, 26 Sep 2000: send-hook '~C mutt-' 'set from="Andy Spiegl [EMAIL PROTECTED]"' but then from is set for the next mail, not for the current one. *argh* This is good and correct. Uhh, no. You can't use $from with send-hooks, because as the person posting noticed, the $from only comes into effect for the next email. You have to use "my_hdr From:" if you want to change the From line from send-hooks. Not sure if that's what you were talking about, or not. :-) OK, I've never actually tried using $from in a send-hook, and was unaware of that issue. I was thinking of the general approach, not the specific hook command. (Oops.) -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago