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

Setting default from address according to recipients



I'm trying to setup mutt to automatically change my default from
address to matthew.dempsky@xxxxxxxxxxxxxxxxxxxx when emailing anyone
with an @utdallas.edu address except our campus's LUG mailing list,
utdlug@xxxxxxxxxxxxx

I tried the following line in my muttrc file:

    send-hook '~t @utdallas\.edu$ !~t ^utdlug@utdallas\.edu$' 'set 
from=matthew.dempsky@xxxxxxxxxxxxxxxxxxxx'

However, it doesn't behave how I was hoping.  It instead changes my
from address for all *future* messages.

Is there a way to have the from address set for the *current* message
and only for that message (except for future messages that also match
the requirements)?

Thanks.