At 23:52 -0500 14 Feb 2001, Daniel J Peng <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 14, 2001 at 06:01:37AM -0600, Aaron Schrab wrote:
> > At the time that send-hooks are evaluated, Mutt has already generated
> > the From: header that it plans to use.
>
> Is this by design? This seems like extraordinarily
> counterintuitive behavior.
Yes it's by design. Doing it this way allows send-hooks to be based on the
effects of $reverse_name which needs to be able to ovverride the value of
$from. The description in the manual even says:
** When set, this variable contains a default from address. It
** can be overridden using my_hdr (including from send-hooks) and
** ``$$reverse_name''.
This timing is its only reason it exists (in 1.0 my_hdr was the only way to
change the From: header). Remember that it's documented as being the *default*
from address, it's not really meant to be changed all the time.
> Also, why should Mutt not set 'realname' and 'from' at the same time?
I don't know. Possibly because having the real name portion available
to send-hooks isn't as usefull as having the address portion available.
And, at least if $reverse_realname variable is not set the realname
portion of the From: header needs to be done after $reverse_name is
applied anyway, so it might as well be after the send-hooks as well.
> > If you want to select a From: header from send-hooks you need to use
> > 'my_hdr From:'.
>
> Will envelope_from set the envelope if I do this?
Yes. The manual is accurate in saying that it uses the address from the
From: header (rather than saying that it uses the $from variable).
--
Aaron Schrab [EMAIL PROTECTED] http://www.execpc.com/~aarons/
/earth is 98% full ... please delete anyone you can.