reading HTML mail

Jim Davis (davis@willow.tc.cornell.edu)
Thu, 16 Jul 92 08:51:35 EDT


I don't know how many of you are using Mime for your mail (other
than Dan) but I am starting to. So today I modified my mailcap
to be handle text/x-html messages, and since there was a little
difficulty I thought I share it with you.

Here is what I added to my mailcap

text/x-html; mime-show-html -f %s; needsterminal

The command mime-show-html is a new script I wrote. It starts
up the Viola WWW browser (for which I thank the author!) but
there are some small problems with Viola

1) It seems that it requires that the file have suffix html
in order to work
2) You can't tell it what file to read from the command line,
rather you must set an environment variable.

So I wrote this little script:

#!/bin/csh
# Run the Viola WWW X windows hypertext system for a Mime message
# I expect caller (metamail) to supply the file to read with -f,
# and it will be a /tmp file

# Process args
while ($#argv > 0 && "$1" =~ -*)
switch ($1)
case -f:
shift
if ($#argv < 1) goto usage
set TEMP = $1.html
cp $1 $TEMP
setenv WWW_HOME $TEMP
shift
breaksw
default:
goto usage
breaksw
endsw
end

set VIOLA=/usr/local/WWW/Viola
setenv VIOLA_PATH $VIOLA/apps
$VIOLA/bin/viola
rm $TEMP
exit 0

usage:
echo "usage: `basename $0` [-f HTML-FILE]"
exit 1

If you wish to use this script you will need to change the
setting of VIOLA depending on where you installed it.

Best wishes, and now we can use Mime to send WWW to each
other more easily.