MIME is an international standard that allows you to send files of
arbitrary contents or type via e-mail.  Mutt is fully MIME-compliant
i.e. Mutt will decode MIME-mails correctly and it allows you to
send attachments to your e-mails in a user-friendly way.  Read
the Mutt documentation to get an idea of how to do this with Mutt.

However there are some more things to do, if you want to exploit
all MIME features.  Some things usually aren't installed on MiNT
machines, and sometimes you have to be a little bit tricky to
use MIME with MiNT.

If you want to learn more about MIME get the metamail package
from
	ftp://ftp.phil.uni-sb.de/pub/atari/mint/mail/mm...

You will find useful shell-scripts and some additional tools that
help you to get even more out of mime.  However, current versions
of Mutt don't need metamail any longer.  It will work without
it, too.

Now for the details.  There's one central configuration file
for all programs (not only Mutt) that support MIME, that's
the so-called mailcap file.  I've included a manual page that
describes the format (usr/local/man/man4/mailcap.1).  After
installing Mutt you should read it once by typing

	man mailcap

into your shell.  You don't have to understand all of it but
you should get a basic idea of how it works.

You haven't read it have you?  OK, the basic idea is:
Every MIME compliant mail has a so-called Content-Type.  The
mailcap file sets up rules of what to do with a particular
content type.  On the Atari you probably want to run CAB
for the type text/html, you want to use your favorite image
viewer for image/gif or image/jpeg, you need a sound player
for sound/au and so on.  

A MIME aware program will examine your mailcap file whenever
it encounters a file that it cannot display itself.  It will then
search an appropriate entry and start the specified program
with the specified arguments.

If you haven't got a mailcap file installed yet take the one
that is included here, edit it to your needs and copy it
to /usr/local/etc/mailcap.  If you want to have special settings
for a particular user, create a file .mailcap in this user's
home directory and edit there.  The personal .mailcap will
override all settings from the system mailcap file.

Actually that's all you have to do.  However, the mailcap mechanism
doesn't work perfectly on Atari machines.  First of all, most
GEM programs won't find their resource files (because you have
to change it the program's directory first before you can start 
it) and there are still many programs that don't accept
MiNT style filenames like /tmp/mutt-user-myimage.  

However there's an easy solution for this problem:  You create
a shell script, let's say /usr/local/bin/showimage and this
shell script will change into the GEM program's directory to
help it find its resource file, it may also convert the arguments
into a form that the old-fashioned program understands.

For an example see the file showhtml.  This script shows how to
do all these things.  Even if you have never written a shell
script before you should be able to edit it to your needs.  This
script is valuable in another way, too:  Mutt automatically
extracts URLs from mails.  If you type <CTRL>-B (note, this is
a capital B!) you will see a list of all URLs found.  You
can select one of them and then automatically use your web
browser (CAB, lynx...) on it.  First try to get showhtml
running, copy it to /usr/local/bin/showhtml and then
insert the line

set web-browser=/usr/local/bin/showhtml

into your Muttrc file.  Now send yourself a mail that contains
a valid URL and it should work.

Note that you probably need a multitasking AES (N.AES, Geneva,
xAES, oAESis, ...) to start GEM programs from within Mutt.

Guido Flohr
--
http://stud.uni-sb.de/~gufl0000/
mailto:gufl0000@stud.uni-sb.de
