[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A viewpoint
Excerpts from internet.ietf-smtp: 22-Jan-91 A viewpoint Risto
> The solution is to have a program which looks the header of the file
> (like the unix file program) and starts a suitable viewer based on that.
> To handle multimedia mail you just would have to set PAGER or some other
> environment variable to that program.
This is more or less the approach I described in an earlier message, but
it isn't quite as simple as you make it sound. I have built a prototype
program called "metamail" and modified about fifteen mail reading
interfaces to use this new program to display various mail formats.
(The formats themselves and the programs called by metamail to display
them are configured by one or more "mailcap" files.) The two places
where it is clearly more complex than a PAGER variable are:
1. You need to use different viewers for different formats. That's
precisely what I use the mailcap files to specify.
2. You need to encapsulate some information about the viewing
environment. For instance, some viewers might require that they be
attached to a real terminal (e.g. to use curses) while some graphical
mail readers may be calling metamail (& through it the viewing program)
without actually being attached to a terminal window. Paging through
"more" or a similar program creates similar problems -- sometimes you
want it and sometimes you don't. In my prototype, there are a few
options in the mailcap file format and the metamail command syntax that
allow the right thing to happen in every case I've managed to think of.
(To know what to do, you need a cross product of information about the
viewer, which comes from the mailcap file,and information about the mail
reading program, which comes from the metamail command line options.)