reading HTML mail

Jim Davis (
Thu, 16 Jul 92 08:51:35 EDT

Date: Thu, 16 Jul 92 08:51:35 EDT
From: (Jim Davis)
Message-Id: <>
Subject: reading HTML mail

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:

# 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:
    if ($#argv < 1) goto usage
    set TEMP = $1.html
    cp $1 $TEMP
    setenv WWW_HOME $TEMP
    goto usage

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

 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.