<<< Date Index >>>     <<< Thread Index >>>

Mutt as command line attachment mailer



Hi Mutts,

I've been using mutt as a command line mailer for some time, piping
message bodies to mutt and using various command line switches to set
headers and whatnot.

I recently discovered that all of this can be done by simply piping a
message (headers and body) directly to sendmail, using the -bm and -t
switches, thus rendering mutt as a command line mailer somewhat
redundant.

However, what about attachment handling?

A quick check on http://foldoc.org throws up:

"Multipurpose Internet Mail Extensions

 <file format, multimedia> (MIME) A standard for multi-part, multimedia
 electronic mail messages and World-Wide Web hypertext documents on the
 Internet. MIME provides the ability to transfer non-textual data, such
 as graphics, audio and fax. It is defined in RFC 2045, RFC 2046, RFC
 2047, RFC 2048, RFC 2049, and BCP0013. It uses mimencode to encode
 binary data into base 64 using a subset of ASCII."

This clearly is something of a dark art to the uninitiated and I would
argue that when it comes to MIME, mutt's -a switch makes mutt a very
useful command line _attachment_ mailer.

No doubt someone will tell me that scripting the writing of multi-part
messages that can be piped directly to sendmail is easy.  Perhaps it
is.  The question is, is it easier than using mutt?

Sebastian