<<< Date Index >>>     <<< Thread Index >>>

Re: Adding a Bcc in a send-hook



* Matthew R. Dempsky on Wednesday, February 28, 2007 at 13:05:35 -0600:
> On Wed, Feb 28, 2007 at 11:11:48AM -0700, Kyle Wheeler wrote:
>> Also, my_hdr is a rather silly way to set your from address. Is there 
>> a reason that you're not using $from? There may be a better way to 
>> achieve what you're after.
> 
> I also have
> 
>   set realname="Matthew R. Dempsky"
>   set from="mrd@xxxxxxxxxxx"
>   set use_from
>   set envelope_from
>   set reverse_name=yes
> 
> (and a bunch of alternatives) in my .muttrc to use mrd@xxxxxxxxxxx by
> default.  I only want to use matthew.dempsky@xxxxxxxxxxxxxxxxxxxx when
> sending email to school faculty/staff.
> 
> I tried using
> 
>   send-hook ... 'set from=matthew.dempsky@xxxxxxxxxxxxxxxxxxxx'
> 
> but that sets the from address for all future emails and not the
> current one.  Is there a different way you had in mind?

The "canonical" way, I believe, is:

set from="mrd@xxxxxxxxxxx"
set use_from
# unset overriding header in default hook
send-hook ~A 'un_myhdr From:'
# set overriding header
send-hook faculty|staff '\
my_hdr From: matthew.dempsky@xxxxxxxxxxxxxxxxxxxx'

c
-- 
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>