Re: can't modify subject from macro?
On Mon, Feb 13, 2006 at 03:42:02PM +0100, Toby wrote:
> > macro index,pager Sy "<enter-command>set mime_fwd ; my_hdr To:
> > abuse@xxxxxxxxx; my_hdr Subject: SPAM report;<enter><forward-message>"
> >
> > Is there another way of doing it?
>
> macro index,pager Sy "<enter-command>set
> mime_fwd<enter><forward-message>abuse@xxxxxxxxx<enter><kill-line>SPAM
> report<enter>"
>
> or, more concisely, if somewhat more cryptic and less portable:
>
> macro index,pager Sy ":set mime_fwd\nfabuse@xxxxxxxxx\n^uSPAM report\n"
>
> or a combination of the two. Add some smart use of "set editor" and
> <send-message> if you want to send the message immediately, maybe with a
> default body.
Thanks for your help, I was able to write a working macro that directly
forwards the message without any user interaction:
macro index,pager Sh "<enter-command>set noautoedit mime_fwd
editor=/bin/true<enter><forward-message>abuse@xxxxxxxxxxx<enter><kill-line>SPAM
report<enter><send-message><enter-command>set autoedit nomime_fwd editor=\"vim
+'/^$'\"<enter>"
> I suppose you know well that 'Sy' binds the macro to 'capital S' quickly
> followed by 'y'. I'm only noting it because it's an unusual hotkey :-)
Yes I know, but this allows to have one macro for each of hotmail,
yahoo, paypal, etc.. (Sh, Sy, Sp, etc.)
Cheers,
--
"Of course Australia was marked for glory, for its people had been
chosen by the finest judges in England."