etach - Emacs extension for MIME attachments and detachments (example detach)


Now suppose you receive an email with an attachment (in this case, a gzipped tarball named "etach-latest.tar.gz"):
From: friend@foo.bar
To: me
Subject: an etach detachment example
Content-Type: multipart/mixed;
	boundary="++----------20000630115142-85420982----------++"
Content-Transfer-Encoding: 7bit

This is a multi-part message in MIME format.
--++----------20000630115142-85420982----------++
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Here is some text.  An attachment follows.
--++----------20000630115142-85420982----------++
Content-Type: application/x-gunzip; name="etach-latest.tar.gz"
Content-Transfer-Encoding: base64

H4sICGInXDkCA2V0YWNoLTEuMC40LnRhcgDsXFtvG0eWzuv0r6jli8SApC3JlicOdgNZkbPKWLZj
ffL6h7NXb36YtR/arz7dz8Hjx8fHj81Xxhw8e7rz//Lz5ODpoTHPDg6fPT48ePrkCLefHD49/Mo8
yRMECAI0u4tkjfrCdHVL5j7Mb9/vO6eq2ZTkZB68xg5gAZ6R+lJ16ly/c+nYNs1W04PZ49mTR6f/
8BfRCIE5tN6uS5i/lg8t+VDo1vwYppzRxV6cKXGlqVWGI/1JfhcOWwZM26EuYtvyuPpS1lUH48fw
x21lt9vf7e/2d/u7/d3+bn+3v9vf7e/2d/u7/d3+bn+3v9vf7e+f/un/AcSfJZQAGAEA
--++----------20000630115142-85420982----------++--

Just type M-x detach RET and the attached file will be detached. In its place is a line indicating where the file now resides:
From: friend@foo.bar
To: me
Subject: an etach detachment example
Content-Type: multipart/mixed;
	boundary="++----------20000630115142-85420982----------++"
Content-Transfer-Encoding: 7bit

This is a multi-part message in MIME format.
--++----------20000630115142-85420982----------++
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Here is some text.  An attachment follows.
--++----------20000630115142-85420982----------++
Content-Type: text/plain; charset=us-ascii
X-Former-Content-Type: application/x-gunzip; name="etach-latest.tar.gz"
Content-Transfer-Encoding: 7bit
X-Former-Content-Transfer-Encoding: base64

[file:/home/me/mail/detached/etach-latest.tar.gz]
--++----------20000630115142-85420982----------++--

Optionally, you can simply click on the the [file:...] line and type C-c C-u or C-c C-f to open any detachment in a browser or another Emacs buffer (details in INSTALL.txt).

Get etach now at http://rulnick.com/etach/download/. (Etach is distributed as a gzipped tarball, meaning as a single "tar" archive file that has been compressed with gzip. Both tar (and untar) and gzip (and gunzip) are freely available elsewhere; see, for example, 'http://www.gnu.org/software/software.html'.)

Etach is free software © 2000-2008 J. Rulnick, etach at rulnick dot com.