Re: send-hook auto cc not working,
- To: mutt-users@xxxxxxxx
 
- Subject: Re: send-hook auto cc not working,
 
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
 
- Date: Tue, 7 Apr 2009 14:27:35 -0500
 
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date	:from:to:subject:message-id:references:mime-version:content-type	:in-reply-to; s=default; bh=+u54EvA1w6yucl7YcPXhTgBYWas=; b=Vhm7	GmEPATxhgBCoKWjpeSCgACTG6uSRgP4J5nUas5B5lfEi+5jF2j5qIwGbagYDOLnt	/tAiuQDpafa1izWw9/kO8z32nvnCU/546SHortbgQFehEmZkXWtJTAkfYHg7PbDv	YRcycoM2AJyi31Su3yBwTq7EHKRtAA4q7BmjF30=
 
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws;  s=default; d=memoryhole.net;  b=dilyx0ytxSzpl+UmhhQJj9OaBIoeLndCoUi1vf+Wbrdts8U/LKR/0CpswR0V01f2rW5TZtb5eflJykZPmzAuDTKVp0ZS4jnuhq7+h9bnUr6L/jdkKi90gJz6EN3ONRQyqaknw8o+uoSXJDodUkYF9DV0R+PJosdlnjiHZ7k/T2o=;  h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
 
- In-reply-to: <128a87f00904071209m1d752fbdn52ace3c85c9604a0@xxxxxxxxxxxxxx>
 
- List-post: <mailto:mutt-users@mutt.org>
 
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
 
- Mail-followup-to: mutt-users@xxxxxxxx
 
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc;	preference=signencrypt
 
- References: <128a87f00904071209m1d752fbdn52ace3c85c9604a0@xxxxxxxxxxxxxx>
 
- Sender: owner-mutt-users@xxxxxxxx
 
- User-agent: Mutt/1.5.19 (2009-04-06)
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday, April  7 at 02:09 PM, quoth zhang zhengquan:
>I would like to auto cc somebody when I send mail to a recipient
Okay, easy enough.
>I googled and put this in to my send_hooks file
>
>send-hook abc@xxxxxxx \
>        "push <edit-cc>,oas@xxxxxx<enter>"
You aren't being explicit about the pattern matching.
>Did I do something wrong here?
When you do not specify a simple pattern operator, mutt uses the value 
of $default_hook to construct the pattern. I don't know what yours is, 
but... the default value of $default_hook is "~f %s !~P | (~P ~C %s)", 
but who knows what it is on your system. It's better to be explicit:
     send-hook '~t abc@xxxxxxx' \
         "push '<edit-cc>,oas@xxxxxxx<enter>'"
If that doesn't work, try this:
     send2-hook '~t abc@xxxxxxx !~C oas@xxxxxxx' \
         "push '<edit-cc>,oas@xxxxxxx<enter>'"
~Kyle
- -- 
Patriotism means to stand by the country. It does not mean to stand by 
the President.
                                                  -- Theodore Roosevelt
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAknbqScACgkQBkIOoMqOI17PKgCfY8ACV1jBjabHXppnnr8/fIOS
kw4AoPazuZy1yuYZz7qUBeqsexRz5iEU
=76iH
-----END PGP SIGNATURE-----