Since version 6.0, VM has had native MIME reading and sending ability. VM can send and receive MIME messages and digests, decode and encode base64 and quoted-printable, and hand off MIME parts to external display programs.
As of version 6.67, a few flaws remain in VM's MIME abilities:
Be sure to check with the latest version of VM before complaining about the absence of full MIME support: some of these issues may already have been resolved.
VM can decode base64-encoded and quoted-printable MIME parts internally, but it's much faster to use an external C program to encode and decode encoded attachments.
Most versions of XEmacs come with a utility called
mimencode or mmencode which can encode and
decode the base64 and quoted-printable encoding. This configuration
should work:
(setq vm-mime-base64-decoder-program "mmencode")
(setq vm-mime-base64-decoder-switches '("-b" "-u"))
(setq vm-mime-base64-encoder-program "mmencode")
(setq vm-mime-base64-encoder-switches '("-b"))
If you don't have the `mmencode' program, you can find free C programs which implement base64 and quoted-printable encoding and decoding in the same place you can find VM.
After you download, compile, and install these two programs, set the variables `vm-mime-base64-decoder-program' and `vm-mime-base64-encoder-program' to point to the locations of these programs.
Thanks to Steven Harp for pointing out the existence of `mmencode'.
VM can display MIME content either externally or internally.
To add an external display program, add an entry to
`vm-mime-external-content-types-alist'. If you have set
the variable `vm-mime-internal-content-types' to a list
of content-types, you need to make sure that the content-type is not
present in it, since the internal content-types are consulted first.
See the documentation for
`vm-mime-external-content-types-alist' for more
information.
For example, if you want to use metamail to dispatch all
your external MIME objects, you should be able to do something like
this:
(setq vm-mime-external-content-types-alist
'((".*" "metamail -c %t -E %e %f")))
In order to display content within emacs, VM needs to know how to
convert the content-type into something it can display. The variable
`vm-mime-type-converter-alist' allows you to define new
conversions and the programs that accomplish them.
See the documentation for `vm-mime-type-converter-alist'
for more information.
See also the previous question, about adding MIME types.
If you don't have an application which can read Microsoft
Word documents, download and install a .DOC-to-text converter;
one such is catdoc, available from
http://www.ice.ru/~vitus/catdoc/.
Next, configure Microsoft Word or Microsoft Word
Viewer to be launched via
`vm-mime-external-type-alist'. For example, if you have
the Applix suite, you could do this:
(add-to-list 'vm-mime-external-content-types-alist
'("application/msword" "applix" "-wp"))
or if using a converter such as catdoc:
(add-to-list 'vm-mime-type-converter-alist
'("application/msword" "text/plain" "catdoc -"))
This feature is already in VM 6.30 and later. Click on the MIME attachment and it will be decoded, and the buffer will be reformatted into text/enriched.
Sure. If you have w3 installed, VM will try to use it
to display text/html attachments. You could also override VM's
behavior by removing "text/html" from
`vm-mime-internal-content-types'.
The simplest alternative is to define cat as a converter
from text/html to text/plain:
(add-to-list 'vm-mime-type-converter-alist
'("text/html" "text/plain" "cat"))
If you'd like to remove the tags from the HTML, you might prefer to
send the output through striphtml, a perl program by Tom
Christiansen. striphtml is available from the
Comprehensive Perl Archive Network
(http://www.cpan.org/). Alternatively, if you have lynx
installed, you can use:
lynx -force_html -dump -stdin
To display text/html parts in an external viewer such as
Netscape, you'll need the program sendurl,
which functions exactly like browse-url-netscape.
(Currently, VM's MIME setup won't allow you to specify a lisp
function such as browse-url-netscape as an external
viewer. You can go ahead and hack in the functionality yourself if
you'd like.)
In some older versions of VM (6.35 through 6.50), the code to use
emacs w3-mode to internally display text/html parts of
MIME messages was commented out. If you have one of those versions
of VM, you should upgrade.
Apparently, TM can do this, but there are problems
between TM and VM. VM may eventually support this; it
may be possible to do it now with tinypgp and some
hacking.
Hold your thumbs (for good luck) and pipe the buffer to
uudecode with '|'.
As of VM 6.48, uuencode is recognized as a Content-Transfer-Encoding, and will be decoded like any normal encoding.
If you have an older version of VM, you can manually mark the
uuencoded region and pipe it to uudecode with
`M-|'.
Quoth Kyle Jones:
A quick tutorial on VM's MIME display variables.
vm-display-using-mime controls whether MIME is displayed
specially at all. Default value is t.
vm-auto-decode-mime-messages controls whether a MIME message
is decoded when the message is selected. Decoding means parsing the
message to figure out what MIME types are in it. This can be
slow for large messages, so you might not want it to happen
automatically. Default value is t.
vm-auto-displayed-mime-content-types controls which MIME types
are displayed immediately after the message is decoded.
Default value is ("text" "multipart").
vm-auto-displayed-mime-content-type-exceptions lists
exceptions to the auto-displayed types. So you can specify
"text" as an auto-displayed type and
'("text/html") as the exceptions list to avoid immediate
display of text/html. Default value is nil.
So the answer to your question is
(add-to-list 'vm-auto-displayed-mime-content-type-exceptions "text/html")