Harvard Mathematics Logo Mime
Back to the main Mime page at the Harvard Mathematics department .
How can I extract mail with attachements without having to use pine or a Netscape mailer?

Look here for a more convenient solution with "munpack", "mpack" (which are now installed on Abel). If you don't have these programs, you can alternatively use programs "metasend" and "metamail".
An example how Alice writes to Bob and sends him a jpg file photo.jpg :

bash> metasend
To: bob@wonderland.edu
Subject: send you a file photo.jpg
Content-type: jpg
Invalid content-type specified
Content-type: mime/jpg
Name of file containing mime/jpg data: photo.jpg
Do you want to encode this data for sending through the mail?
  1 -- No, it is already in 7 bit ASCII
  2 -- Yes, encode in base64 (most efficient)
  3 -- Yes, encode in quoted-printable (less efficient, more readable)
  4 -- Yes, encode it using uuencode (not standard, being phased out)
Do you want to include another file too (y/n) [n] ? n
Delivering mail, please wait...  Mail delivery apparently succeeded.
Bob first saves the mail in a file "fromalice.tmp"

bash> mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/bob": 1 message 1 new
>N  1 alice@wonderland.edu    Tue Sep 19 00:10 1227/88712 "test"
& s 1 fromalice.tmp
"fromalice.tmp" [Appended]
& x
then extracts the picture from that file with

bash> metamail fromalice.tmp
To: bob@wonderland.edu
Subject:  send you a file photo.jpg
Content-Description:  An object packed by metasend
Date: Tue, 19 Sep 2000 00:10:03 -0400 (EDT)
From: alice@wonderland.edu (Alice)

This message contains 'mime/jpg`-format data.
Please enter the name of a file to which the data should be written
(Default: /tmp/mm.IqbCQz) > photo.jpg
Wrote file photo.jpg

With a jpg entry in the file .mime.types, metamail will start up an external viewer.

Last update: 9/19/2000 Back to the Math department homepage