Re: Metamail and mailcap

From: Howard Schwartz (theo@ncal.verio.com)
Date: Fri, 17 Jul 1998 10:06:46 -0700 (PDT)

>From: Katt@dsuper.net (Katt Freyson)
> Okay, is there anyway to get metamail to save the output to
>a file? LIke by editing mailcap? Right now my mailcap file is as
>follows:
>
>text/*; less %s
>
>
> Is there a way to set the entry so that it send %s to a
>file, like what it does when the type is not defined in the mailcap
>file? Except do it automatically. For example, if I get in eMail a
>html file named hi.html that processing the mime would save a file
>named hi.html in my directory?

The man page documentation for metamail says that:

metamail -w %s

will MIME decode the file, and then save it to a file, instead of sending
it through a viewer. metamail.1 (the man page) also telly you how to run
metamail on the (DOS) command line, in general. I am surpirsed you did not
receive metamail.1 when you obtained the program itself.

If you run win98, of course, you must start a DOS box to run metamail on
the command line. There are also some progmams that create a pseudo
commanding within windows to run both windows and dos programs, by
typing program names and switches on a command line.

Finally, I thought of a trick to make metamail save to a file optionally,
for certain files. Say you had a line like,

text/*; save.bat %s

in mailcap. Then, you could put prompts and ``type %1 > filename''
or whatever you wanted in save.bat, and metamail should run save.bat
for you whenever it encounters mime encoded text files.