Simple Multi-Media Message Composition

Here's an example of how you can compose a multi-media e-mail message. The prompts and other MH program outputs are shown in typewriter style; your responses are shown in slanted style.

% comp
To: ghb@white-house.gov
Cc:
Subject: you're sacked!
——-

As you know, your contract of employment with us contained an ``at will'' clause. We have chosen to exercise that clause. A security guard shall escort you to your desk, from which you may obtain your personal effects, and then escort you from the premises. A severance check shall be mailed to you shortly. Good day to you, sir.
#audio/basic /goodies/sounds/rude-noise.au
#image/gif /goodies/images/rude-gesture.gif

^D
What now? edit mhn -list

msg part  type/subtype               size description                         
  1        multipart/mixed            45K
    1      text/plain                 332
    2      audio/basic               8961
    3      image/gif                  36K

What now? send

As you can see from the output of the edit mhn command, this message has three parts:


\begin{briefenum}
\item a plain text part (the introductory paragraph);
\item an...
...art inserted via the line beginning with {\tt\char93 image/gif}.
\end{briefenum}

In the interest of good taste, we shan't show you the image, nor play for you the audio. The names of the files should be self-explanatory.

The lines beginning with hash marks (#) in the message above are examples of mhn's special directives.

Each ``#'' directive indicates a message part, and identifies what type of information is to be carried in that part. For example, a message part containing audio data might have either type audio/basic or type audio/x-next. (These are both audio types; the subtypes are basic and x-next.) A list of the pre-defined types and subtypes is given in appendix [*].

By using variants of the directives shown above, it's possible to tell mhn to collect into a message the audio or image data produced by running a program.

At the What Now? prompt, when you typed the command edit mhn, a new draft was created, replacing your previous draft. Thereafter, if instead of typing send, you had typed edit emacs, you would see MIME constructs in place of your original mhn directives, looking something like this:

To: ghb@white-house.gov
Subject: you're sacked!
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"

------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"

As you know, your contract of employment with us contained
... [remainder of introductory paragraph omitted]

------- =_aaaaaaaaaa0
Content-Type: audio/basic
Content-Transfer-Encoding: base64

LnNuZAAAACgAAAk/AAAAAQAAH0AAAAABdGVycmllciBiYXJrAAAAAFdSUVVdcuXc3OLtdmFbWV5r
897Z2d/tfGliYWVu8eHXz8vL0ONdS0ZGTVhq49PMy9X4W05NT1VfftnKyMvQ3vlhTktbeFhIQ0t8
... [ many lines of encoded audio data omitted ]

------- =_aaaaaaaaaa0
Content-Type: image/gif
Content-Transfer-Encoding: base64

R0lGODdhgALgAcMAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/
... [ many lines of encoded image data omitted ]

------- =_aaaaaaaaaa0--

Looks horrendous, doesn't it? You may be relieved to know that this tutorial doesn't explain all the gory details of the MIME format per se, and you don't really have to know them to use MH's multi-media features, because mhn shields you. If you're interested, there are references to documents that cover MIME at the end of the tutorial.

If you want to make corrections to a draft already processed by edit mhn, you can recover the original draft, containing your original mhn directives, from a file that mhn names as ,msg.orig, where msg is whatever the designation of the original draft was. Example: ˜/Mail/drafts/,1.orig.

Using mhn's directives, you don't need a bit-mapped display or a digital audio device to compose a multi-media e-mail message. But you do need a graphical display to view image parts and you do need a speaker to listen to audio parts. There are other types of useful multi-media components that can be displayed and manipulated with nothing more than a plain old fixed-font 24×80 ASCII terminal.