MH & nmh: Reading MIME Messages
Author: Brent B. Welch

# Reading MIME Messages

[previous] [next] [table of contents] [index]

By now you should have also received the sample MIME message from mh-mime-sample@ics.uci.edu that you requested at the end of the Section Sending Mail. (The Chapter Introduction to MIME introduces MIME mail.)

If you can't send mail outside your site, or if you'd rather not wait for the email to come back, you also can get a copy of the sample message from this book's online archive. The file is chapter05/mime-sample; you can copy it into your inbox by going to a UNIX shell prompt (shown as `%` here) and typing the command line below. Be sure to use backquotes (```), not single quotes (`'`):

    % cp /path-to-/chapter05/mime-sample `mhpath new +inbox`

The Figure below shows the sample message displayed in exmh. The `Clip` menu entry was used to display it in a larger, detached window.

Figure: Displaying a MIME message

The MIME message has three parts to it; these are numbered and labeled in the display. The first part is a multipart/alternative content, which means there are a few different ways to view the content. This is indicated by the message under the heading 1. that there are alternative views of the following content. exmh will display what it thinks is the best alternative; you see the text/enriched content displayed in part 1.2. If you want to see the other alternatives, then you can press the right button over section 1 to get a popup menu with some choices.

The next two parts are an audio clip and a picture in GIF format. The text for each part tells you a command you could run to view, or hear, the part. However, all you need to do is press the right mouse button over each part in order to get a menu of operations to perform on the content. If you press the right button over part 2., then the popup menu will offer you these choices:

- Decode part as MIME
- Save Hello from the author...
- View using mailcap rule...
- Pass an audio fragment to metamail...

The first item is a checkbox menu item that lets you view the raw content if you want to. The `Save...` menu entry displays a file selection box so you can choose a non-temporary file to store the content. The next two entries should result in the same thing. They use the mailcap specifications to run another program that displays the content. In the first case, `View using mailcap rule...`, exmh runs the program directly. In the other case, `Pass to metamail...`, the metamail program is run first; it decodes the mailcap file and runs the external program.

[Table of Contents] [Index] [Previous: Getting New Mail] [Next: Replying to Mail]

(This section was written by Brent Welch.)
Last change $Date: 1999/10/10 05:14:05 $

This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.