David --

...and then Mikko Hänninen said...
% David Petrou <[EMAIL PROTECTED]> wrote on Mon, 07 Feb 2000:
% > is it possible to have a dynamic my_hdr?  i want to add a line to the
% > header of my outgoing email, but i want the line to be generated
% > dynamically.
% 
% I'm not sure if you can do it with a simple call to my_hdr (I doubt
% that), but it should be possible to have something like:
% 
%   send-hook . 'my_hdr Reply-To: `your_perl_script.pl`'

It sure is.


% 
% ... which will execute the above hook command for every new email.  If
% you get the quoting level right, the command in the backtics (`) will be
% re-invoked for each email, giving you a different output for each email.

That's the trick, in fact.


% Note that the above may not be the right level of quoting, I didn't test
% it in any way, you may need to experiment a bit to get it working.

  send-hook .   my_hdr X-Wedding-Date: 94/01/15-19:30
  send-hook .   'my_hdr X-Wedding-Time: `wed.one`'

You got it right, Mikko.  See the example from my .muttrc (which I'm no
longer using, BTW, which is why you don't see it in these headers).  The
Date never changes, so I can set that statically.  The Time, however,
should be updated freshly with every new email, so I put it in '' to make
it evaluate at call time.  [Without, wed.one gets run only when I start
mutt or otherwise source my.muttrc file.]


% 
% Also remember that the script needs to print out a \n at the end, or
% Mutt won't recognize the output.
% 
% 
% Hope this helps,

What he said :-)


% Mikko
% -- 
% // Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
% // The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
% // Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
% Woe unto them that rise up early in the morning -- Isaiah 5:11


:-D
-- 
David T-G                       * It's easier to fight for one's principles
(play) [EMAIL PROTECTED]      * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.bigfoot.com/~davidtg/        Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
The "new millennium" starts at the beginning of 2001.  There was no year 0.
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*

PGP signature

Reply via email to