raf wrote: > What's a good way to automatically add a Cc: header > for a particular address when sending/replying/forwarding? > But not if they're already going to receive the email. > And only when sending from a particular address. > > e.g. Add a CC header to f...@work.com whenever > sending/replying/forwarding from m...@work.com unless the > email is already going to f...@work.com. > > Can it be done in .muttrc or should I automate it in > the editor? I already have mutt's editor variable set > to a script that uses perl to preprocess the file > slightly before starting vim so I could just add to > that but I was wondering if there's another way.
I've done it as a perl script that reads the email and adds the Cc: header if necessary. It's run before and after invoking vim in the editor script that is invoked by mutt. I realised that, sometimes, my main email address is in the From: header when the editor starts, not my work email. Sometimes I have to change it manually in the editor, so the preprocessor needs to run after editing as well as before. cheers, raf