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


Begin composing an email message:
To: friend@foo.bar
Subject: an etach attachment example
--text follows this line--
Dear Friend,

Here is that file you wanted.

Me

Now type M-x attach RET and, when prompted, enter the file to attach. Here, we attach a file called b.sh. Your message is instantly transformed to a MIME message with attachment:
To: friend@foo.bar
Subject: an etach attachment example
Mime-Version: 1.0
Content-Type: multipart/mixed;
	boundary="++----------20000630114139-112632577----------++"
Content-Transfer-Encoding: 7bit
--text follows this line--
This is a multi-part message in MIME format.
--++----------20000630114139-112632577----------++
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dear Friend,

Here is that file you wanted.

Me
--++----------20000630114139-112632577----------++
Content-Type: application/x-sh; name="b.sh"
Content-Transfer-Encoding: base64

IyB+Ly5iYXNoW19wcm9maWxlLHJjXTogZXhlY3V0ZWQgYnkg
CmV4cG9ydCBQQUdFUiBQQVRIIFBTMSBURVhJTlBVVFMgCg==
--++----------20000630114139-112632577----------++--


You can continue editing the text portion of the message, then send when ready.

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.