On Fri Nov26'21 05:53:54PM, Mihai Lazarescu wrote:
> From: Mihai Lazarescu <mtl...@gmail.com>
> Date: Fri, 26 Nov 2021 17:53:54 +0100
> To: mutt-users@mutt.org
> Subject: Re: [Mutt] help on complicated per-folder or per-sender sending
>  email hooks
>
> On Thursday, November 25, 2021 at 18:32:50 -0600, mai...@email.com wrote:
>
> > I had a few more questions. Is it possible to have a hook based on where 
> > the email is coming to? So, if I am in this folder, then I use the above, 
> > but I am wondering if I can have a hook that says something like if the 
> > e-mail was sent to mai...@email.com then use the same account.
>
> reverse_name may help if you always want to reply using the address on which
> you received the message.
>
> For more flexibility, you may want to unset reverse_name and look at
> reply-hook and/or send-hook and send2-hook instead, e.g.:
>
> reply-hook  '.' 'set from = [your address when no match]
> reply-hook  '~h @([-[:alnum:]_]+\.)*somedomain\.com' 'set from = ...'
>
> and send-to counterparts:
>
> send-hook   '! ~Q' 'set from = [your address when no match]
> send-hook   '~t @([-[:alnum:]_]+\.)*somedomain\.com' 'set from = ...'
> send2-hook  '~t @([-[:alnum:]_]+\.)*somedomain\.com' 'set from = ...'
>
> > Also, how do I give multiple folders for a hook? So, in the above, if I am 
> > in mutt or R or fedora, etc, I can use that account? Or do I specify one 
> > hook for each folder?
>
> This should do:
>
> folder-hook '(mutt|R|fedora)' 'set ...'
>

Mihai,

Thanks very much again! So I have found a flaw in my setup. Basically, if the 
email is postponed and called from the draft, it uses my work account (because 
that is set up to be the default). Is it possible to set things up so that mutt 
will look at the sending address (@email dot com or the work address, say) and 
decide to use the appropriate smtp?

Many thanks and best wishes,
Ranjan

Reply via email to